Directory listing in libsmbclient.so

Steve Langasek vorlon at netexpress.net
Fri Dec 29 21:32:30 GMT 2000


On Fri, 29 Dec 2000, Christopher R. Hertel wrote:

> > 	group = nmb_find_group(name,NULL);
> > 	while (!group) {
> > 		scope = strrchr(name, '.');
> > 		if (!scope) break;
> > 		scope++ = '\0';

		*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.

I blame the bug on the fact that I've been working in PHP a lot more than I
have in C this week. :)

I think an escape sequence may be sufficient.  Using escape sequences to
represent a '.' in a netbios name is also cumbersome enough for a user that
they may think twice before using them, and there are already plenty of
reasons why it's good for periods to not be used.

Steve Langasek
postmodern programmer





More information about the samba-technical mailing list