summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-05-31 22:02:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:02 -0500
commiteb676446bdd58f0c96026f2b39e5cc603f848145 (patch)
treefee496bdd05ed4e43f75c1ddc283aa887a500c70
parent97a164ba96d48a81d5e24dda6b866a4d78ea1a78 (diff)
downloadsamba-eb676446bdd58f0c96026f2b39e5cc603f848145.tar.gz
samba-eb676446bdd58f0c96026f2b39e5cc603f848145.tar.bz2
samba-eb676446bdd58f0c96026f2b39e5cc603f848145.zip
r23279: Replace occurrence of sid_binstring inside lookup_groupmem
by sid_string_static. (This used to be commit ba3026dce02d554313647c3d6825bfe0d30d6ffc)
-rw-r--r--source3/nsswitch/winbindd_ads.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 2dcd1284b3..eda3dfb785 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -901,7 +901,6 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
ADS_STRUCT *ads = NULL;
char *ldap_exp;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
- char *sidstr;
char **members = NULL;
int i;
size_t num_members = 0;
@@ -914,7 +913,6 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
char **domains_nocache = NULL; /* only needed for rpccli_lsa_lookup_sids */
uint32 num_nocache = 0;
-
DEBUG(10,("ads: lookup_groupmem %s sid=%s\n", domain->name,
sid_string_static(group_sid)));
@@ -933,19 +931,14 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
goto done;
}
- if ((sidstr = sid_binstring(group_sid)) == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto done;
- }
-
/* search for all members of the group */
- if (!(ldap_exp = talloc_asprintf(mem_ctx, "(objectSid=%s)",sidstr))) {
- SAFE_FREE(sidstr);
- DEBUG(1, ("ads: lookup_groupmem: tallloc_asprintf for ldap_exp failed!\n"));
+ if (!(ldap_exp = talloc_asprintf(mem_ctx, "(objectSid=%s)",
+ sid_string_static(group_sid))))
+ {
+ DEBUG(1, ("ads: lookup_groupmem: talloc_asprintf for ldap_exp failed!\n"));
status = NT_STATUS_NO_MEMORY;
goto done;
}
- SAFE_FREE(sidstr);
args.control = ADS_EXTENDED_DN_OID;
args.val = ADS_EXTENDED_DN_HEX_STRING;