diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-10 17:39:27 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-10 20:56:16 +0100 |
commit | 3ea64e0ad86c35e5f0018ac60571e7a31a968543 (patch) | |
tree | 466ba7bc27e51491a9f64339e988a5468e5bd733 /source3/utils | |
parent | 50b7a3233f1edc184acb0b65870fff1db1226ef4 (diff) | |
download | samba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.tar.gz samba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.tar.bz2 samba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.zip |
s3: Replace most calls to sid_append_rid() by sid_compose()
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_groupmap.c | 9 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 7 | ||||
-rw-r--r-- | source3/utils/pdbedit.c | 3 |
3 files changed, 7 insertions, 12 deletions
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c index 7180a953bb..e82c7b14f2 100644 --- a/source3/utils/net_groupmap.c +++ b/source3/utils/net_groupmap.c @@ -299,8 +299,7 @@ static int net_groupmap_add(struct net_context *c, int argc, const char **argv) /* append the rid to our own domain/machine SID if we don't have a full SID */ if ( !string_sid[0] ) { - sid_copy(&sid, get_global_sam_sid()); - sid_append_rid(&sid, rid); + sid_compose(&sid, get_global_sam_sid(), rid); sid_to_fstring(string_sid, &sid); } @@ -610,8 +609,7 @@ static int net_groupmap_set(struct net_context *c, int argc, const char **argv) } } - sid_copy(&map.sid, get_global_sam_sid()); - sid_append_rid(&map.sid, c->opt_rid); + sid_compose(&map.sid, get_global_sam_sid(), c->opt_rid); map.sid_name_use = SID_NAME_DOM_GRP; fstrcpy(map.nt_name, ntgroup); @@ -795,8 +793,7 @@ static bool print_alias_memberships(TALLOC_CTX *mem_ctx, for (i = 0; i < num_alias_rids; i++) { DOM_SID alias; - sid_copy(&alias, domain_sid); - sid_append_rid(&alias, alias_rids[i]); + sid_compose(&alias, domain_sid, alias_rids[i]); printf("%s\n", sid_string_tos(&alias)); } diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 7dc8c1dd2c..762af716f5 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -3889,8 +3889,8 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd, sid_array.sids[j].sid); } - sid_copy(&alias.sid, domain_sid); - sid_append_rid(&alias.sid, groups->entries[i].idx); + sid_compose(&alias.sid, domain_sid, + groups->entries[i].idx); push_alias(mem_ctx, &alias); } @@ -5450,8 +5450,7 @@ static NTSTATUS rpc_trustdom_del_internals(struct net_context *c, } /* append the rid to the domain sid */ - sid_copy(&trust_acct_sid, domain_sid); - if (!sid_append_rid(&trust_acct_sid, user_rids.ids[0])) { + if (!sid_compose(&trust_acct_sid, domain_sid, user_rids.ids[0])) { goto done; } diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 06eedef920..ac41dc0ad0 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -68,8 +68,7 @@ static int get_sid_from_cli_string(DOM_SID *sid, const char *str_sid) "a complete SID or RID!\n"); return -1; } - sid_copy(sid, get_global_sam_sid()); - sid_append_rid(sid, rid); + sid_compose(sid, get_global_sam_sid(), rid); } return 0; |