diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-13 16:28:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-13 16:28:48 +0000 |
commit | da20d4e5df3c908cc00bf31570892fa5f19853e7 (patch) | |
tree | 5e4b59ca754f52845989f62ad25f08233b206ad4 /source3/rpc_server | |
parent | 3d528fef2f75e0cb8d7812e164d249226e889f80 (diff) | |
download | samba-da20d4e5df3c908cc00bf31570892fa5f19853e7.tar.gz samba-da20d4e5df3c908cc00bf31570892fa5f19853e7.tar.bz2 samba-da20d4e5df3c908cc00bf31570892fa5f19853e7.zip |
It compiles for me now :-). rpc_server/srv_lsa.c - added fix to allow w2k
clients to join a Samba domain - odd or even domain name length. Needs more testing.
Jeremy.
(This used to be commit 408672d38261e34cc3714200617b35464d88f931)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index b9b7a0328d..3629bb7d8e 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -90,14 +90,23 @@ static void init_dom_query(DOM_QUERY *d_q, char *dom_name, DOM_SID *dom_sid) { int domlen = (dom_name != NULL) ? strlen(dom_name) : 0; + /* + * I'm not sure why this really odd combination of length + * values works, but it does appear to. I need to look at + * this *much* more closely - but at the moment leave alone + * until it's understood. This allows a W2k client to join + * a domain with both odd and even length names... JRA. + */ + + d_q->uni_dom_str_len = domlen ? ((domlen + 1) * 2) : 0; d_q->uni_dom_max_len = domlen * 2; - d_q->uni_dom_str_len = domlen * 2; - - d_q->buffer_dom_name = dom_name ? 1 : 0; - d_q->buffer_dom_sid = dom_sid ? 1 : 0; + 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 */ init_unistr2(&d_q->uni_domain_name, dom_name, domlen); + d_q->uni_domain_name.uni_max_len++; + if (dom_sid != NULL) init_dom_sid2(&d_q->dom_sid, dom_sid); } |