diff options
author | Volker Lendecke <vl@sernet.de> | 2007-11-23 12:04:35 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-23 13:04:50 -0800 |
commit | d2c2635a280b1bfbbcd52fa96bbeff3f60672c45 (patch) | |
tree | 1de5760414dafc0790ab62f9aa37c960707c0d1f /source3/utils | |
parent | 450ca80b57b4271e31a70c2db0d325a0dd1699d1 (diff) | |
download | samba-d2c2635a280b1bfbbcd52fa96bbeff3f60672c45.tar.gz samba-d2c2635a280b1bfbbcd52fa96bbeff3f60672c45.tar.bz2 samba-d2c2635a280b1bfbbcd52fa96bbeff3f60672c45.zip |
Make remote_password_change return malloced error strings
This fixes a segfault in smbpasswd -r
(This used to be commit 49949f0b85007c7c2b3c340c12f3d18909862135)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbpasswd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index b7fc65525a..2154f5d15f 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -243,9 +243,10 @@ static NTSTATUS password_change(const char *remote_mach, char *username, return NT_STATUS_UNSUCCESSFUL; } ret = remote_password_change(remote_mach, username, - old_passwd, new_pw, err_str, sizeof(err_str)); - if(*err_str) + old_passwd, new_pw, &err_str); + if (err_str != NULL) fprintf(stderr, "%s", err_str); + SAFE_FREE(err_str); return ret; } |