aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-03-23 23:54:26 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-03-23 23:54:26 +0100
commitcc74a38d4a210c915233d04cfb8a62cde97c1b62 (patch)
treeb071ca7e8c9928b7fd1a11bd6ef0f0e42a2d098a /winsup
parent7db1c6fc4e2ae3772384480bb98a41cdc28ffd09 (diff)
downloadnewlib-cc74a38d4a210c915233d04cfb8a62cde97c1b62.zip
newlib-cc74a38d4a210c915233d04cfb8a62cde97c1b62.tar.gz
newlib-cc74a38d4a210c915233d04cfb8a62cde97c1b62.tar.bz2
Cygwin: //tsclient: allow to enumerate shares
The //tsclient provider is WNNC_NET_TERMSRV. Fixes: 7db1c6fc4e2a ("Cygwin: //server: revert to using WNet and support NFS shares") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler/netdrive.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler/netdrive.cc b/winsup/cygwin/fhandler/netdrive.cc
index 5328429..fc71016 100644
--- a/winsup/cygwin/fhandler/netdrive.cc
+++ b/winsup/cygwin/fhandler/netdrive.cc
@@ -394,8 +394,12 @@ create_thread_and_wait (DIR *dir)
}
+
/* Eventually, try SMB via WNet for share enumeration. */
- ndi.provider = WNNC_NET_LANMAN;
+ if (!strcmp (dir->__d_dirname + 2, "tsclient"))
+ ndi.provider = WNNC_NET_TERMSRV;
+ else
+ ndi.provider = WNNC_NET_LANMAN;
ndi.sem = CreateSemaphore (&sec_none_nih, 0, 2, NULL);
thr = new cygthread (thread_netdrive_wnet, &ndi, "netdrive_smb");
if (thr->detach (ndi.sem))