From fe8383382d5b8221093a5340705c4e5b3731a249 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 4 Nov 1999 21:41:36 +0000 Subject: samuserset -p password. YESSSSS :) you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no). (This used to be commit f52504c553becc64b89d546a57b1bd9cf1bc5b5c) --- source3/lib/util_unistr.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 9078a4fbc6..6f90528bf4 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -267,13 +267,23 @@ copies a UNISTR2 structure. ********************************************************************/ BOOL copy_unistr2(UNISTR2 *str, const UNISTR2 *from) { - /* set up string lengths. add one if string is not null-terminated */ - str->uni_max_len = from->uni_max_len; - str->undoc = from->undoc; - str->uni_str_len = from->uni_str_len; + if (from != NULL) + { + /* set up string lengths. add one if string is not null-terminated */ + str->uni_max_len = from->uni_max_len; + str->undoc = from->undoc; + str->uni_str_len = from->uni_str_len; - /* copy the string */ - memcpy(str->buffer, from->buffer, sizeof(from->buffer)); + /* copy the string */ + memcpy(str->buffer, from->buffer, sizeof(from->buffer)); + } + else + { + str->uni_max_len = 1; + str->undoc = 0; + str->uni_str_len = 1; + str->buffer[0] = 0; + } return True; } -- cgit