The Samba-Bugzilla – Bug 4
net user -l truncates comments
Last modified: 2007-04-26 12:54:06 UTC
net user -l -U administrator -S apollo
truncates the comments at 50 characters
net.exe on windows won't allow more than 50 characters, nor will the RAP
protocol send back more than 50, but through AD management tools you can do
this, and now net should via RPC.
net user -l -U administrator -S apollo now returns the full comment. I
attempted this with RAP as well, and, per the comments from Jim McDonough, it
behaves as expected in the protocol (still truncates at 50 characters.) Status
will stay RESOLVED/FIXED with the caveat that I verified the fix.
I wrote a small test application that links with libsmbclient. The relevant
lines in it of note are:
ret = cli_RNetGroupEnum(cli, my_group_callback, NULL);
In my_group_callback() I have no string length specifiers in the printf() I do.
It is printing the full group comment when I use cli_RNetGroupEnum() so I'm
assuming RAP actually does return more than 50 characters.
Reopening to get it fixed in the net_rap.c code.
Well I'll be...
The OS/2 docs show it as a 50-byte field, so don't go trying to set more than 50
byte comments on an OS/2 server :-)
But the RAP protocol has it defined as type "z", so there is no limit in the
protocol. Fixed in cvs.
originally reported against 3.0alpha23. Bugzilla spring cleaning.
Created attachment 2424
Created attachment 2425
Created attachment 2426
Created attachment 2427
Created attachment 2428