NetShareEnumAll returns truncated strings
Dhananjay Sathe
dhananjaysathe at gmail.com
Tue Jun 28 00:16:51 MDT 2011
Hi Ricardo,
This could be some help , the code works in my case , i get the following
names :
[u'netlogon', u'sysvol', u'IPC$']
this is the code i am using in my code :
info_ctr = srvsvc.NetShareInfoCtr()
info_ctr.level = 502
(info_ctr, totalentries, self.resume_handle_share) = \
self.pipe.NetShareEnum(self.
server_unc, info_ctr,
self.max_buffer,
self.resume_handle_share)
Note :
here
self.max buffer is = -1
self.server_unc = '\\' + server_address
and resume handle is initialised to 0x00000000 and reused through the
program .
you could look at list_shares and list_shares_all methods in
https://gitorious.org/samba-gtk-frequent-personal/samba-gtk-frequent-personal/blobs/master/pygwshare.py
It works against samba 4 alpha 15, and against a git build a few weeks ago .
Dunno if something has gone wrong recently
what exact version of samba 4 are you testing your code against ?
Hope that was useful in any way :)
Cheers !!!
Dhananjay Deepak Sathe | +919764871950
dhananjaysathe at gmail.com,f2009260 at bits-goa.ac.in
Blog : http://dsathe.blogspot.com
2nd Year Undergraduate,
BE(Hons) Electronics and Instrumentation,
BITS Pilani Goa Campus.
More information about the samba-technical
mailing list