dannys at cinesite.co.uk
Wed Jan 29 15:30:47 GMT 2003
I've just come across a problem listing shares on both samba and Win*
boxes using the samba suite.
Initially I tried using 'smbclient -L' and parsing the output using a
perl script, which works to a degree.
The problem is that the V2.x.x smbclient uses the old-style "RAP" calls
to talk to the server, which are limited to 13 charcter return values.
I overcame this by using a V3 'net rpc share' command instead, and
discovered that the output is limited by the format string in net_rpc.c
to 12 characters instead (net_rpc.c:1125 and net_rpc.c:1128). Surely
this is a little short sighted?
I've got around the problem for now, by changing the format strings, but
it's maybe worth looking at a more generic solution?
Personally I think it would be nice to be able to pass a format
specifier to such commands, for use in these kinds of cases. Does anyone
have any views on that? Assuming people are agreeable to it, I'm happy
to attempt some patches...
Senior Systems Administrator, Cinesite (Europe) Ltd
020 7973 4000 - x4055 / dannys at cinesite.co.uk
More information about the samba-technical