The Samba-Bugzilla – Bug 480
Can not lookup SID for user names with UTF8 characters (WINBINDD_LOOKUPNAME)
Last modified: 2005-11-14 09:28:17 UTC
I use code:
NSS_STATUS result = winbindd_request(WINBINDD_LOOKUPNAME, &request,
to lookup SID of user. Here state_.user is null-terminated UTF8 string.
Defect happens when i try to lookup SID of user with i18n characters in the
In traffic there is illegal length of UNICODE string transmitted over wire. The
string itself is OK, but length is calculated wrong. It multiples any i18n
character on 2. It may happen because of code like strlen(str)*2 under UTF8
string which may do this result.
Created attachment 154 [details]
Patch to fix the problem (to rpc_parse/parse_lsa.c file from 3.0RC3
I am not sure it completely resolves the problem but it works.
By the way i found numerous places where strlen(UTF8String) is multiplied by 2
and assumed to be the right length of UNICODE string.
Probably bug#386 has the same reason.
I have fixed this in the current SAMBA_3_0 CVS. It will be fixed for 3.0.1.
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.