diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-19 02:05:19 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-19 02:05:19 +0000 |
commit | e1820455c24de024a2ff7418bd2d14ad943563fa (patch) | |
tree | ac07d1bc1a2dc8adc95aa057147f150c839617e4 /source3/rpc_server | |
parent | 3365a2fd234966ecfcd06d2295cbd085c7bbd8c6 (diff) | |
download | samba-e1820455c24de024a2ff7418bd2d14ad943563fa.tar.gz samba-e1820455c24de024a2ff7418bd2d14ad943563fa.tar.bz2 samba-e1820455c24de024a2ff7418bd2d14ad943563fa.zip |
nt5rc2 falling over because the LsaQueryInfoPolicy() response _must_
have the string max length = string length + 1.
if not, then it gets its knickers in a twist over whether the string
is NULL-terminated or not.
four days.
four days i spent on this one.
(This used to be commit 9795e5948c698115e34c28993cdb82ba31377f5d)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index 7bc5841cfc..b1761219af 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -88,14 +88,15 @@ static void make_dom_query(DOM_QUERY *d_q, char *dom_name, DOM_SID *dom_sid) fstring sid_str; int domlen = strlen(dom_name); + d_q->uni_dom_str_len = (domlen+1) * 2; d_q->uni_dom_max_len = domlen * 2; - d_q->uni_dom_str_len = domlen * 2; d_q->buffer_dom_name = domlen != 0 ? 1 : 0; /* domain buffer pointer */ d_q->buffer_dom_sid = dom_sid != NULL ? 1 : 0; /* domain sid pointer */ /* this string is supposed to be character short */ make_unistr2(&(d_q->uni_domain_name), dom_name, domlen); + d_q->uni_domain_name.uni_max_len++; sid_to_string(sid_str, dom_sid); make_dom_sid2(&(d_q->dom_sid), dom_sid); |