Directory listing in libsmbclient.so

Christopher R. Hertel crh at nts.umn.edu
Fri Dec 29 21:27:11 GMT 2000


> On Fri, 29 Dec 2000, Welsh, Armand wrote:
> 
> > IIRC correctly, "." is a valid character for domains, I seem to remember
> > working on a domain (workgroup) that was the same as my dns domain.. In
> > fact, now that I think about it, I remember working on several domains that
> > were like this at client sites.  But what about using this format...
> 
> > smb://[workgroup[:scope]/]
> 
> So is ':' a legal character in a netbios name?  What is the legal set of
> characters for netbios names?

There are few, if any, restrictions.  The RFCs say only that the name may 
not begin with a '*'.

> If there are no characters that are legal in URLs and illegal in netbios
> names, it may be that we'll end up needing something like this...
> 
> 	group = nmb_find_group(name,NULL);
> 	while (!group) {
> 		scope = strrchr(name, '.');
> 		if (!scope) break;
> 		scope++ = '\0';
> 		group = nmb_find_group(name,scope);
> 	}


That's one way (though I think I see a small bug).  The other is to use 
an escape sequence as is currently done in URLs.

This, and the misconfigured network problem, are both inherent in the NBT
system.  The misconfigured network problem was identified by the RFC
authors themselves.  See:  RFC 1001, Section 10.  The RFCs also deal with
the issue of otherwise-illegal characters in the NetBIOS name by encoding
the name to an always-legal form.  We are not dealing with anything new
here. 

So we can't look at these as major problems, just annoyances to be worked 
around.

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz





More information about the samba-technical mailing list