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

Lautier, Marc LautiM at
Mon Feb 9 13:52:30 GMT 2004


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:

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 ?

Software Engineer
(+33)5 62 17 31 07 phone
Email: LautiM at


More information about the samba-technical mailing list