diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-07 18:25:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:32 -0500 |
commit | 620f2e608f70ba92f032720c031283d295c5c06a (patch) | |
tree | ec3dd5fcf29eaa98a26ddeae3acb7a89fd0e0fb8 /source/libads/krb5_setpw.c | |
parent | 12440744ba36445186042c8c254785766cce5385 (diff) | |
download | samba-620f2e608f70ba92f032720c031283d295c5c06a.tar.gz samba-620f2e608f70ba92f032720c031283d295c5c06a.tar.xz samba-620f2e608f70ba92f032720c031283d295c5c06a.zip |
r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
Diffstat (limited to 'source/libads/krb5_setpw.c')
-rw-r--r-- | source/libads/krb5_setpw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/libads/krb5_setpw.c b/source/libads/krb5_setpw.c index 95825748514..dadce2593c8 100644 --- a/source/libads/krb5_setpw.c +++ b/source/libads/krb5_setpw.c @@ -54,7 +54,7 @@ static DATA_BLOB encode_krb5_setpw(const char *principal, const char *password) DATA_BLOB ret; - princ = strdup(principal); + princ = SMB_STRDUP(principal); if ((c = strchr_m(princ, '/')) == NULL) { c = princ; @@ -156,7 +156,7 @@ static krb5_error_code build_kpasswd_request(uint16 pversion, return ret; } - packet->data = (char *)malloc(ap_req->length + cipherpw.length + 6); + packet->data = (char *)SMB_MALLOC(ap_req->length + cipherpw.length + 6); if (!packet->data) return -1; @@ -407,7 +407,7 @@ static ADS_STATUS do_krb5_kpasswd_request(krb5_context context, free(chpw_req.data); chpw_rep.length = 1500; - chpw_rep.data = (char *) malloc(chpw_rep.length); + chpw_rep.data = (char *) SMB_MALLOC(chpw_rep.length); if (!chpw_rep.data) { close(sock); free(ap_req.data); @@ -631,7 +631,7 @@ static ADS_STATUS ads_krb5_chg_password(const char *kdc_host, /* We have to obtain an INITIAL changepw ticket for changing password */ asprintf(&chpw_princ, "kadmin/changepw@%s", (char *) krb5_princ_realm(context, princ)); - password = strdup(oldpw); + password = SMB_STRDUP(oldpw); ret = krb5_get_init_creds_password(context, &creds, princ, password, kerb_prompter, NULL, 0, chpw_princ, &opts); |