diff options
author | Jean-François Micouleau <jfm@samba.org> | 2001-11-21 23:25:30 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2001-11-21 23:25:30 +0000 |
commit | bfbe7f377e5fcb09e87bfc866196dfc51a8fe64d (patch) | |
tree | 7846b2e95eb62c4699ce3e2e02623d7a2b9345ba /source/rpc_parse/parse_misc.c | |
parent | 54c968913d6553c6d834b068234ab176917075eb (diff) | |
download | samba-bfbe7f377e5fcb09e87bfc866196dfc51a8fe64d.tar.gz samba-bfbe7f377e5fcb09e87bfc866196dfc51a8fe64d.tar.xz samba-bfbe7f377e5fcb09e87bfc866196dfc51a8fe64d.zip |
samr_querydom_info level 1: found the meaning of the unknow fields. And
discovered that our reply is short by 4 bytes since day 1 of this code.
Added a decode function to rpcclient too.
splitted the STRING2 fields filling while trying to understand the win9x
userlist bug. (didn't fix the bug, but the reply looks closer to NT).
J.F.
Diffstat (limited to 'source/rpc_parse/parse_misc.c')
-rw-r--r-- | source/rpc_parse/parse_misc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c index 5160a2778f7..4507c296133 100644 --- a/source/rpc_parse/parse_misc.c +++ b/source/rpc_parse/parse_misc.c @@ -820,23 +820,23 @@ void copy_unistr2(UNISTR2 *str, const UNISTR2 *from) Creates a STRING2 structure. ********************************************************************/ -void init_string2(STRING2 *str, const char *buf, int len) +void init_string2(STRING2 *str, const char *buf, int max_len, int str_len) { int alloc_len = 0; /* set up string lengths. */ - str->str_max_len = len; + str->str_max_len = max_len; str->undoc = 0; - str->str_str_len = len; + str->str_str_len = str_len; /* store the string */ - if(len != 0) { - if (len < MAX_STRINGLEN) + if(str_len != 0) { + if (str_len < MAX_STRINGLEN) alloc_len = MAX_STRINGLEN; str->buffer = talloc_zero(get_talloc_ctx(), alloc_len); if (str->buffer == NULL) smb_panic("init_string2: malloc fail\n"); - memcpy(str->buffer, buf, len); + memcpy(str->buffer, buf, str_len); } } |