Directory listing in libsmbclient.sou

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed Dec 27 23:23:07 GMT 2000


> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at nts.umn.edu]
> 
> Here are the things I would like to be able to specify in a URI:
> 
	Well I think we can reduce the problem by declaring some of this concrete. The URL will begin with smb://, backslashes are not to be used, you can not rely on querying the network to resolve an ambiguity, and an infrequent case should not incur complexity for the normal case.

	I think the below authentication info is decidedly:

	auth = [[domain/]user[:pass]@]

> - username and password
> - authentication domain (that is, do we present the authentication 
>   request to the server or domain controller, or to a domain controller in
>   another domain to support trust relationships)
> 
	I think this is also pretty concrete?

	hier = [/share[/path[/file]]]

	Notice the server is not specified because many suggestions have included appending or prepending the workgroup to the server.

> - server
> - service
> - path
> - file
> 
	And the trouble maker is the workgroup. I think the '#' is ok to use in URLs. It's used in the ref portion of a normal http URL.

	- workgroup/ntdomain (perhaps the default value could come from some 
	  config file--but we still want to be able to override it)

	So if we assume that auth and hier are concrete than you have a few possibilities:

	1) smb://[workgroup][auth]server[hier]

	2) smb://[auth][workgroup]server[hier]

	3) smb://[auth]server[workgroup][heir]

	If I explore using the '#' in case 1 you get URLs like:

	smb://workgroup#domain/user:password@server/share/path/file
	smb://workgroup#server/share/path/file
	smb://workgroup#
	smb://workgroup#domain/user:password@

	In case 2 you get stuff like:

	smb://domain/user:password#workgroup@server/share/path/file
	smb://#workgroup@server/share/path/file
	smb://#workgroup
	smb://domain/user:password#workgroup

	And in case 3 you have:

	smb://domain/user:password@server#workgroup/share/path/file
	smb://server#workgroup/share/path/file
	smb://#workgroup/
	smb://server#workgroup

	Let's not forget that we can rule out certain combinations of info based on context. For example authentication information is not really needed to browse servers of a workgroup(several of the above examples don't make sense but the parsing routine doesn't care either way), using the workgroup is only necessary if it differs from the domain, etc. Also, even though some of these URLs are pretty ugly the workgroup name would be used _very_ rarely I think.

	Mike






More information about the samba-technical mailing list