libsmbclient: parsing of domain/workgroup in smbc_parse_path not performed.

Lautier, Marc LautiM at europe.stortek.com
Mon Feb 9 13:52:30 GMT 2004


Hi,

I'm currently working on some customization of the libsmbclient.

I noticed that the smbc_parse_path function, which is supposed to decode
URLs with the format:
	smb://[[[domain;]user[:password]@]server[/share[/path[/file]]]]

does in fact totally ignore the domain field.

Instead from being parsed from the URL (when present), that information
seems to be copied directly from the context workgroup field, or the
authentication function.


Is there is specific reason NOT to retrieve that information from the URL
when it is present ?

I've made myself a customized libsmbclient.c where smbc_parse_path decode
and return that information when it is present. When returning from
smbc_parse_path, I then proccess is username : if not empty, I used the
parsed value, otherwise I copy the workgroup from the context.

That appear to be working for me so far, but I have nothing approaching an
adequate testing environment for that kind of change.


As a side note, I've added two entry point to my customized libsmbclient :
int smbc_sid_to_name(const char *server_URL, const char *sid, char *value,
size_t size);
int smbc_name_to_sid(const char *server_URL, const char *name, char *value,
size_t size);

These two calls will open the IPC$$ pipe on the server designated by
server_URL (share, path an filname ignored), an attempt to resolve an SID
into a User Name, or the opposit.

Would that be a suitable official extension to libsmbclient ?




Thanks,
Marc LAUTIER
Software Engineer
(+33)5 62 17 31 07 phone
StorageTek
INFORMATION made POWERFUL
Email: LautiM at storagetek.com




 


More information about the samba-technical mailing list