[bug?] cygwin cannot mount smb shares beginning with underscore; "Invalid argument"

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Jan 23 13:19:48 GMT 2023


On Jan 22 12:56, Brian Inglis via Cygwin wrote:
> On 2023-01-22 12:21, Corinna Vinschen via Cygwin wrote:
> > On Jan 21 11:30, Jeremy Hetzler via Cygwin wrote:
> > > First, thank you for many years of Cygwin.
> > > 
> > > I'm unable to get Cygwin to mount Windows SMB shares where the share
> > > name begins with underscore. mount gives an error "Invalid argument".
> > 
> > Yes, that's actually a bug.  The mount code path in Cygwin checks
> > the path for being a share (i.e. \\server\share\... syntax)
> > 
> > The code, which, incidentally, has only been marginally changed since
> > its inception pre-2000, is expecting that server name as well as share
> > name both start with an alphanumeric ASCII char.
> > 
> > That means, right now you can't mount servers and shares starting with
> > any character other than [0-9a-zA-Z].  D'oh.
> 
> https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou
> 
> looks like embedded not initial or final "-" hyphen/minus is also allowed as
> well as an initial "_" underscore like DNS names.

I also checked
https://answers.microsoft.com/en-us/windows/forum/all/which-characters-are-acceptable-for-a-computer/fddb4895-4295-47ab-a2b9-7773b329718c
and pushed another patch to distinguish valid chars for server name and
share name.

The Cygwin test release containing this patch, 3.5.0-0.139.gcad3913ed8b1,
is just being built.


Thanks,
Corinna


More information about the Cygwin mailing list