summaryrefslogtreecommitdiffstats
path: root/source3/winbindd
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/winbindd
parent50b7a3233f1edc184acb0b65870fff1db1226ef4 (diff)
downloadsamba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.tar.gz
samba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.tar.xz
samba-3ea64e0ad86c35e5f0018ac60571e7a31a968543.zip
s3: Replace most calls to sid_append_rid() by sid_compose()
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_hash/idmap_hash.c3
-rw-r--r--source3/winbindd/idmap_tdb.c3
-rw-r--r--source3/winbindd/winbindd_ads.c3
-rw-r--r--source3/winbindd/winbindd_cache.c3
-rw-r--r--source3/winbindd/winbindd_pam.c4
-rw-r--r--source3/winbindd/winbindd_rpc.c5
6 files changed, 8 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_hash/idmap_hash.c b/source3/winbindd/idmap_hash/idmap_hash.c
index 7d4dd2b5ab0..1227b2a0520 100644
--- a/source3/winbindd/idmap_hash/idmap_hash.c
+++ b/source3/winbindd/idmap_hash/idmap_hash.c
@@ -193,8 +193,7 @@ static NTSTATUS unixids_to_sids(struct idmap_domain *dom,
if (!hashed_domains[h_domain].sid)
continue;
- sid_copy(ids[i]->sid, hashed_domains[h_domain].sid);
- sid_append_rid(ids[i]->sid, h_rid);
+ sid_compose(ids[i]->sid, hashed_domains[h_domain].sid, h_rid);
ids[i]->status = ID_MAPPED;
}
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index 189b0888091..8bfe751a8ba 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -97,8 +97,7 @@ static int convert_fn(struct db_record *rec, void *private_data)
rid = atoi(p);
- sid_copy(&sid, &domain->sid);
- sid_append_rid(&sid, rid);
+ sid_compose(&sid, &domain->sid, rid);
sid_to_fstring(keystr, &sid);
key2 = string_term_tdb_data(keystr);
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index d15fb86d86e..f647a3ffaf1 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -880,8 +880,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
goto done;
}
- sid_copy(&primary_group, &domain->sid);
- sid_append_rid(&primary_group, primary_group_rid);
+ sid_compose(&primary_group, &domain->sid, primary_group_rid);
count = ads_pull_sids(ads, mem_ctx, msg, "tokenGroups", &sids);
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 68972dd18d4..b7b5e6d7eda 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -2986,8 +2986,7 @@ void wcache_invalidate_samlogon(struct winbindd_domain *domain,
return;
}
- sid_copy(&sid, info3->base.domain_sid);
- sid_append_rid(&sid, info3->base.rid);
+ sid_compose(&sid, info3->base.domain_sid, info3->base.rid);
/* Clear U/SID cache entry */
fstr_sprintf(key_str, "U/%s", sid_to_fstring(sid_string, &sid));
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 357b6463d52..4658231a5cb 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -195,8 +195,8 @@ static NTSTATUS append_afs_token(TALLOC_CTX *mem_ctx,
DOM_SID user_sid;
fstring sidstr;
- sid_copy(&user_sid, info3->base.domain_sid);
- sid_append_rid(&user_sid, info3->base.rid);
+ sid_compose(&user_sid, info3->base.domain_sid,
+ info3->base.rid);
sid_to_fstring(sidstr, &user_sid);
afsname = talloc_string_sub(mem_ctx, afsname,
"%s", sidstr);
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 2146953639a..87494db2bba 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -612,9 +612,8 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
return NT_STATUS_NO_MEMORY;
for (i=0;i<(*num_groups);i++) {
- sid_copy(&((*user_grpsids)[i]), &domain->sid);
- sid_append_rid(&((*user_grpsids)[i]),
- rid_array->rids[i].rid);
+ sid_compose(&((*user_grpsids)[i]), &domain->sid,
+ rid_array->rids[i].rid);
}
return NT_STATUS_OK;