summaryrefslogtreecommitdiff
path: root/source3/libnet/libnet_samsync_passdb.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-10 17:39:27 +0100
committerVolker Lendecke <vl@samba.org>2010-01-10 20:56:16 +0100
commit3ea64e0ad86c35e5f0018ac60571e7a31a968543 (patch)
tree466ba7bc27e51491a9f64339e988a5468e5bd733 /source3/libnet/libnet_samsync_passdb.c
parent50b7a3233f1edc184acb0b65870fff1db1226ef4 (diff)
downloadsamba-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/libnet/libnet_samsync_passdb.c')
-rw-r--r--source3/libnet/libnet_samsync_passdb.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/libnet/libnet_samsync_passdb.c b/source3/libnet/libnet_samsync_passdb.c
index 41a9b3d9f3..51f96dc398 100644
--- a/source3/libnet/libnet_samsync_passdb.c
+++ b/source3/libnet/libnet_samsync_passdb.c
@@ -318,8 +318,7 @@ static NTSTATUS fetch_account_info(TALLOC_CTX *mem_ctx,
goto done;
}
- sid_copy(&user_sid, get_global_sam_sid());
- sid_append_rid(&user_sid, r->rid);
+ sid_compose(&user_sid, get_global_sam_sid(), r->rid);
DEBUG(3, ("Attempting to find SID %s for user %s in the passdb\n",
sid_to_fstring(sid_string, &user_sid), account));
@@ -395,8 +394,7 @@ static NTSTATUS fetch_group_info(TALLOC_CTX *mem_ctx,
fstrcpy(comment, r->description.string);
/* add the group to the mapping table */
- sid_copy(&group_sid, get_global_sam_sid());
- sid_append_rid(&group_sid, rid);
+ sid_compose(&group_sid, get_global_sam_sid(), rid);
sid_to_fstring(sid_string, &group_sid);
if (pdb_getgrsid(&map, group_sid)) {
@@ -459,8 +457,7 @@ static NTSTATUS fetch_group_mem_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- sid_copy(&group_sid, get_global_sam_sid());
- sid_append_rid(&group_sid, rid);
+ sid_compose(&group_sid, get_global_sam_sid(), rid);
if (!get_domain_group_from_sid(group_sid, &map)) {
DEBUG(0, ("Could not find global group %d\n", rid));
@@ -491,8 +488,7 @@ static NTSTATUS fetch_group_mem_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
- sid_copy(&member_sid, get_global_sam_sid());
- sid_append_rid(&member_sid, r->rids[i]);
+ sid_compose(&member_sid, get_global_sam_sid(), r->rids[i]);
if (!pdb_getsampwsid(member, &member_sid)) {
DEBUG(1, ("Found bogus group member: %d (member_sid=%s group=%s)\n",
@@ -587,8 +583,7 @@ static NTSTATUS fetch_alias_info(TALLOC_CTX *mem_ctx,
fstrcpy(comment, r->description.string);
/* Find out whether the group is already mapped */
- sid_copy(&alias_sid, dom_sid);
- sid_append_rid(&alias_sid, rid);
+ sid_compose(&alias_sid, dom_sid, rid);
sid_to_fstring(sid_string, &alias_sid);
if (pdb_getgrsid(&map, alias_sid)) {