public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: //tsclient: allow to enumerate shares
@ 2024-03-23 22:54 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2024-03-23 22:54 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=cc74a38d4a210c915233d04cfb8a62cde97c1b62

commit cc74a38d4a210c915233d04cfb8a62cde97c1b62
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Sat Mar 23 23:54:26 2024 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Sat Mar 23 23:54:26 2024 +0100

    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>

Diff:
---
 winsup/cygwin/fhandler/netdrive.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler/netdrive.cc b/winsup/cygwin/fhandler/netdrive.cc
index 5328429ac34f..fc71016de304 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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-23 22:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 22:54 [newlib-cygwin/main] Cygwin: //tsclient: allow to enumerate shares Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).