libsmbclient: POLICY_HND not initialized for cached servers
LautiM at europe.stortek.com
Mon Feb 9 13:28:55 GMT 2004
I'm currently working on some customization of the libsmbclient.
During some tests, I encountered difficulties executing some requests past
the first one.
When tracking down the problem, I discovered that the stack "allocated" pol
variable (of type POLICY_HND), is not properly initialized in function
smbc_attr_server when the server is retrieved from the server cache.
This will cause some calls to fail past the first one, especially if the
stackspace where pol is allocated is overwritten between the calls (so it's
not necessarily evident by doing a loop to generate lots of calls).
I could reproduce this issue with a custom testacl.c (from the libsmbclient
Attached is the diff to get a testacl that fails (on the default get
request, it performs two get, the second one failing to resolve SIDs into
What is (or should be) the lifecycle of the POLICY_HND here ?
I see two possible fixes here:
- reinitialize a new POLICY_HND in smbc_attr_server when a server is
retrieved from the cache.
- cache the POLICY_HND along with the SMBCSRV object, perhaps by
putting it directly in the SMBCSRV when pertinent (for "IPC$$" servers).
Does anybody have any insight as to the best way to fix that issue ?
(+33)5 62 17 31 07 phone
INFORMATION made POWERFUL
Email: LautiM at storagetek.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 890 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040209/e76b3206/testacl.obj
More information about the samba-technical