1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r4005: Fix for bug #2071 reported by Jason Mader <jason@ncac.gwu.edu>.

Use correct enum type for comparisons.
Jeremy.
(This used to be commit b926480d05)
This commit is contained in:
Jeremy Allison 2004-11-29 19:28:12 +00:00 committed by Gerald (Jerry) Carter
parent 86d528928d
commit b9fcb5b961
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ BOOL netsamlogon_cache_store(TALLOC_CTX *mem_ctx, const char * username, NET_USE
/* so we fill it in since winbindd_getpwnam() makes use of it */
if ( !user->uni_user_name.buffer ) {
init_unistr2( &user->uni_user_name, username, STR_TERMINATE );
init_unistr2( &user->uni_user_name, username, UNI_STR_TERMINATE );
init_uni_hdr( &user->hdr_user_name, &user->uni_user_name );
}

View File

@ -934,7 +934,7 @@ void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags)
if (buf) {
rpcstr_push((char *)str->buffer, buf, len, STR_TERMINATE);
num_chars = strlen_w(str->buffer);
if (flags == STR_TERMINATE || flags == UNI_MAXLEN_TERMINATE) {
if (flags == UNI_STR_TERMINATE || flags == UNI_MAXLEN_TERMINATE) {
num_chars++;
}
}