diff options
author | Jeremy Allison <jra@samba.org> | 2007-09-14 17:42:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:47 -0500 |
commit | ab9d7bf4f950a78d9ca7973294d133290c99096c (patch) | |
tree | 0137d6eb9490415502d9b9a232033efb51b7b48b /source3/winbindd | |
parent | 47107b2cdea7c58c337639f6d1aaab94390bf0f6 (diff) | |
download | samba-ab9d7bf4f950a78d9ca7973294d133290c99096c.tar.gz samba-ab9d7bf4f950a78d9ca7973294d133290c99096c.tar.bz2 samba-ab9d7bf4f950a78d9ca7973294d133290c99096c.zip |
r25165: Use talloc_asprintf_append_buffer with an unmodified
string.
Jeremy.
(This used to be commit fe30a523dfc77cc373145624246fd3ad5c62b9ac)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_ad.c | 14 | ||||
-rw-r--r-- | source3/winbindd/idmap_ldap.c | 8 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index 41dbb471f9..b2d41e436c 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -315,7 +315,7 @@ again: ATYPE_WORKSTATION_TRUST, ATYPE_INTERDOMAIN_TRUST); } - u_filter = talloc_asprintf_append(u_filter, "(%s=%lu)", + u_filter = talloc_asprintf_append_buffer(u_filter, "(%s=%lu)", ad_schema->posix_uidnumber_attr, (unsigned long)ids[idx]->xid.id); CHECK_ALLOC_DONE(u_filter); @@ -329,7 +329,7 @@ again: ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_LOCAL_GROUP); } - g_filter = talloc_asprintf_append(g_filter, "(%s=%lu)", + g_filter = talloc_asprintf_append_buffer(g_filter, "(%s=%lu)", ad_schema->posix_gidnumber_attr, (unsigned long)ids[idx]->xid.id); CHECK_ALLOC_DONE(g_filter); @@ -344,16 +344,16 @@ again: filter = talloc_asprintf(memctx, "(|"); CHECK_ALLOC_DONE(filter); if ( u_filter) { - filter = talloc_asprintf_append(filter, "%s))", u_filter); + filter = talloc_asprintf_append_buffer(filter, "%s))", u_filter); CHECK_ALLOC_DONE(filter); TALLOC_FREE(u_filter); } if ( g_filter) { - filter = talloc_asprintf_append(filter, "%s))", g_filter); + filter = talloc_asprintf_append_buffer(filter, "%s))", g_filter); CHECK_ALLOC_DONE(filter); TALLOC_FREE(g_filter); } - filter = talloc_asprintf_append(filter, ")"); + filter = talloc_asprintf_append_buffer(filter, ")"); CHECK_ALLOC_DONE(filter); rc = ads_search_retry(ads, &res, filter, attrs); @@ -535,12 +535,12 @@ again: for (i = 0; (i < IDMAP_AD_MAX_IDS) && ids[idx]; i++, idx++) { sidstr = sid_binstring(ids[idx]->sid); - filter = talloc_asprintf_append(filter, "(objectSid=%s)", sidstr); + filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)", sidstr); free(sidstr); CHECK_ALLOC_DONE(filter); } - filter = talloc_asprintf_append(filter, "))"); + filter = talloc_asprintf_append_buffer(filter, "))"); CHECK_ALLOC_DONE(filter); DEBUG(10, ("Filter: [%s]\n", filter)); diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index 3b63915b05..9daf084ce1 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -955,12 +955,12 @@ again: bidx = idx; for (i = 0; (i < IDMAP_LDAP_MAX_IDS) && ids[idx]; i++, idx++) { - filter = talloc_asprintf_append(filter, "(%s=%lu)", + filter = talloc_asprintf_append_buffer(filter, "(%s=%lu)", (ids[idx]->xid.type==ID_TYPE_UID)?uidNumber:gidNumber, (unsigned long)ids[idx]->xid.id); CHECK_ALLOC_DONE(filter); } - filter = talloc_asprintf_append(filter, "))"); + filter = talloc_asprintf_append_buffer(filter, "))"); CHECK_ALLOC_DONE(filter); DEBUG(10, ("Filter: [%s]\n", filter)); } else { @@ -1185,12 +1185,12 @@ again: bidx = idx; for (i = 0; (i < IDMAP_LDAP_MAX_IDS) && ids[idx]; i++, idx++) { - filter = talloc_asprintf_append(filter, "(%s=%s)", + filter = talloc_asprintf_append_buffer(filter, "(%s=%s)", LDAP_ATTRIBUTE_SID, sid_string_static(ids[idx]->sid)); CHECK_ALLOC_DONE(filter); } - filter = talloc_asprintf_append(filter, "))"); + filter = talloc_asprintf_append_buffer(filter, "))"); CHECK_ALLOC_DONE(filter); DEBUG(10, ("Filter: [%s]", filter)); } else { diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index 67cf6abc2b..d9a42c31dc 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -858,7 +858,7 @@ static const char *collect_onlinestatus(TALLOC_CTX *mem_ctx) } for (domain = domain_list(); domain; domain = domain->next) { - if ((buf = talloc_asprintf_append(buf, "%s:%s ", + if ((buf = talloc_asprintf_append_buffer(buf, "%s:%s ", domain->name, domain->online ? "Online":"Offline")) == NULL) { @@ -866,7 +866,7 @@ static const char *collect_onlinestatus(TALLOC_CTX *mem_ctx) } } - buf = talloc_asprintf_append(buf, "\n"); + buf = talloc_asprintf_append_buffer(buf, "\n"); DEBUG(5,("collect_onlinestatus: %s", buf)); |