diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-14 21:10:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-14 21:10:49 +0000 |
commit | f8a4273407f2983bb05a76e914d4f532bbd5004e (patch) | |
tree | 5a6eb4e2394e08ba36873bed8f7e1790e395f316 /source3/rpc_server | |
parent | 109654575b3c68db3c5cea4e7701ada622f3f8cb (diff) | |
download | samba-f8a4273407f2983bb05a76e914d4f532bbd5004e.tar.gz samba-f8a4273407f2983bb05a76e914d4f532bbd5004e.tar.bz2 samba-f8a4273407f2983bb05a76e914d4f532bbd5004e.zip |
passdb.c
server.c: Moved generate_machine_sid() into passdb.c for Jean-Francois
(who might want an LDAP version). Changed locking to free exclusive
lock as soon as possible to prevent contention.
lib/rpc/parse/parse_samr.c
lib/rpc/server/srv_samr.c: Changed last SID-as-string manipulation
function to use DOM_SID structure.
Jeremy.
(This used to be commit 3b8f5aef57b4f37265c0403385053085f0df6f18)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index 88217f73aa..821ae75c11 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -211,8 +211,6 @@ static void samr_reply_unknown_3(SAMR_Q_UNKNOWN_3 *q_u, { SAMR_R_UNKNOWN_3 r_u; DOM_SID3 sid[MAX_SAM_SIDS]; - fstring user_sid; - fstring user_rid; int pol_idx; uint32 rid; uint32 status; @@ -233,14 +231,21 @@ static void samr_reply_unknown_3(SAMR_Q_UNKNOWN_3 *q_u, if (status == 0x0) { - sid_to_string(user_sid, &global_machine_sid); - slprintf(user_rid, sizeof(user_rid) - 1, "-%x", rid); - fstrcat(user_sid, user_rid); + DOM_SID user_sid; + DOM_SID other_sid; + + user_sid = global_machine_sid; + /* + * Add the user RID. + */ + user_sid.sub_auths[user_sid.num_auths++] = rid; + + string_to_sid(&other_sid, "S-1-1"); /* maybe need another 1 or 2 (S-1-5-20-0x220 and S-1-5-20-0x224) */ /* these two are DOMAIN_ADMIN and DOMAIN_ACCT_OP group RIDs */ - make_dom_sid3(&(sid[0]), 0x035b, 0x0002, "S-1-1"); - make_dom_sid3(&(sid[1]), 0x0044, 0x0002, user_sid); + make_dom_sid3(&(sid[0]), 0x035b, 0x0002, &other_sid); + make_dom_sid3(&(sid[1]), 0x0044, 0x0002, &user_sid); } make_samr_r_unknown_3(&r_u, |