diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/cldap/cldap.c | 14 | ||||
-rw-r--r-- | source4/libcli/nbt/nbtname.c | 2 | ||||
-rw-r--r-- | source4/libcli/security/sddl.c | 12 | ||||
-rw-r--r-- | source4/libcli/util/asn1.c | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c index 4c41e13014..9381e80934 100644 --- a/source4/libcli/cldap/cldap.c +++ b/source4/libcli/cldap/cldap.c @@ -536,26 +536,26 @@ struct cldap_request *cldap_netlogon_send(struct cldap_socket *cldap, ldap_encode_ndr_uint32(tmp_ctx, io->in.version)); if (filter == NULL) goto failed; if (io->in.user) { - filter = talloc_asprintf_append(filter, "(User=%s)", io->in.user); + filter = talloc_asprintf_append_buffer(filter, "(User=%s)", io->in.user); if (filter == NULL) goto failed; } if (io->in.host) { - filter = talloc_asprintf_append(filter, "(Host=%s)", io->in.host); + filter = talloc_asprintf_append_buffer(filter, "(Host=%s)", io->in.host); if (filter == NULL) goto failed; } if (io->in.realm) { - filter = talloc_asprintf_append(filter, "(DnsDomain=%s)", io->in.realm); + filter = talloc_asprintf_append_buffer(filter, "(DnsDomain=%s)", io->in.realm); if (filter == NULL) goto failed; } if (io->in.acct_control != -1) { - filter = talloc_asprintf_append(filter, "(AAC=%s)", + filter = talloc_asprintf_append_buffer(filter, "(AAC=%s)", ldap_encode_ndr_uint32(tmp_ctx, io->in.acct_control)); if (filter == NULL) goto failed; } if (io->in.domain_sid) { struct dom_sid *sid = dom_sid_parse_talloc(tmp_ctx, io->in.domain_sid); if (sid == NULL) goto failed; - filter = talloc_asprintf_append(filter, "(domainSid=%s)", + filter = talloc_asprintf_append_buffer(filter, "(domainSid=%s)", ldap_encode_ndr_dom_sid(tmp_ctx, sid)); if (filter == NULL) goto failed; } @@ -564,11 +564,11 @@ struct cldap_request *cldap_netlogon_send(struct cldap_socket *cldap, NTSTATUS status; status = GUID_from_string(io->in.domain_guid, &guid); if (!NT_STATUS_IS_OK(status)) goto failed; - filter = talloc_asprintf_append(filter, "(DomainGuid=%s)", + filter = talloc_asprintf_append_buffer(filter, "(DomainGuid=%s)", ldap_encode_ndr_GUID(tmp_ctx, &guid)); if (filter == NULL) goto failed; } - filter = talloc_asprintf_append(filter, ")"); + filter = talloc_asprintf_append_buffer(filter, ")"); if (filter == NULL) goto failed; search.in.dest_address = io->in.dest_address; diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index 911eb0cb5f..416814220b 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -111,7 +111,7 @@ _PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const NT_STATUS_NOT_OK_RETURN(status); if (component == NULL) break; if (name) { - name = talloc_asprintf_append(name, ".%s", component); + name = talloc_asprintf_append_buffer(name, ".%s", component); NT_STATUS_HAVE_NO_MEMORY(name); } else { name = (char *)component; diff --git a/source4/libcli/security/sddl.c b/source4/libcli/security/sddl.c index 4342a7b87a..d4efab9b64 100644 --- a/source4/libcli/security/sddl.c +++ b/source4/libcli/security/sddl.c @@ -405,7 +405,7 @@ static char *sddl_flags_to_string(TALLOC_CTX *mem_ctx, const struct flag_map *ma /* now by bits */ for (i=0;map[i].name;i++) { if ((flags & map[i].flag) != 0) { - s = talloc_asprintf_append(s, "%s", map[i].name); + s = talloc_asprintf_append_buffer(s, "%s", map[i].name); if (s == NULL) goto failed; flags &= ~map[i].flag; } @@ -532,7 +532,7 @@ static char *sddl_encode_acl(TALLOC_CTX *mem_ctx, const struct security_acl *acl for (i=0;i<acl->num_aces;i++) { char *ace = sddl_encode_ace(sddl, &acl->aces[i], domain_sid); if (ace == NULL) goto failed; - sddl = talloc_asprintf_append(sddl, "(%s)", ace); + sddl = talloc_asprintf_append_buffer(sddl, "(%s)", ace); if (sddl == NULL) goto failed; talloc_free(ace); } @@ -563,28 +563,28 @@ char *sddl_encode(TALLOC_CTX *mem_ctx, const struct security_descriptor *sd, if (sd->owner_sid != NULL) { char *sid = sddl_encode_sid(tmp_ctx, sd->owner_sid, domain_sid); if (sid == NULL) goto failed; - sddl = talloc_asprintf_append(sddl, "O:%s", sid); + sddl = talloc_asprintf_append_buffer(sddl, "O:%s", sid); if (sddl == NULL) goto failed; } if (sd->group_sid != NULL) { char *sid = sddl_encode_sid(tmp_ctx, sd->group_sid, domain_sid); if (sid == NULL) goto failed; - sddl = talloc_asprintf_append(sddl, "G:%s", sid); + sddl = talloc_asprintf_append_buffer(sddl, "G:%s", sid); if (sddl == NULL) goto failed; } if ((sd->type & SEC_DESC_DACL_PRESENT) && sd->dacl != NULL) { char *acl = sddl_encode_acl(tmp_ctx, sd->dacl, sd->type, domain_sid); if (acl == NULL) goto failed; - sddl = talloc_asprintf_append(sddl, "D:%s", acl); + sddl = talloc_asprintf_append_buffer(sddl, "D:%s", acl); if (sddl == NULL) goto failed; } if ((sd->type & SEC_DESC_SACL_PRESENT) && sd->sacl != NULL) { char *acl = sddl_encode_acl(tmp_ctx, sd->sacl, sd->type>>1, domain_sid); if (acl == NULL) goto failed; - sddl = talloc_asprintf_append(sddl, "S:%s", acl); + sddl = talloc_asprintf_append_buffer(sddl, "S:%s", acl); if (sddl == NULL) goto failed; } diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index 8bd091a319..7e2d54fcbd 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -514,13 +514,13 @@ BOOL ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID) tmp_oid = talloc_asprintf(mem_ctx, "%u", b[0]/40); if (!tmp_oid) goto nomem; - tmp_oid = talloc_asprintf_append(tmp_oid, ".%u", b[0]%40); + tmp_oid = talloc_asprintf_append_buffer(tmp_oid, ".%u", b[0]%40); if (!tmp_oid) goto nomem; for(i = 1, v = 0; i < blob.length; i++) { v = (v<<7) | (b[i]&0x7f); if ( ! (b[i] & 0x80)) { - tmp_oid = talloc_asprintf_append(tmp_oid, ".%u", v); + tmp_oid = talloc_asprintf_append_buffer(tmp_oid, ".%u", v); v = 0; } if (!tmp_oid) goto nomem; |