diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-04 21:41:36 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-04 21:41:36 +0000 |
commit | fe8383382d5b8221093a5340705c4e5b3731a249 (patch) | |
tree | 90a273d77990efc6ff60503fe1756e9397de3d6d /source3/lib | |
parent | cae821d45926157a250e9fa047e0c8aa8c0c2c54 (diff) | |
download | samba-fe8383382d5b8221093a5340705c4e5b3731a249.tar.gz samba-fe8383382d5b8221093a5340705c4e5b3731a249.tar.bz2 samba-fe8383382d5b8221093a5340705c4e5b3731a249.zip |
samuserset <username> -p password. YESSSSS :)
you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no).
(This used to be commit f52504c553becc64b89d546a57b1bd9cf1bc5b5c)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_unistr.c | 22 |
1 files changed, 16 insertions, 6 deletions
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; } |