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/web | |
parent | 450ca80b57b4271e31a70c2db0d325a0dd1699d1 (diff) | |
download | samba-d2c2635a280b1bfbbcd52fa96bbeff3f60672c45.tar.gz samba-d2c2635a280b1bfbbcd52fa96bbeff3f60672c45.tar.xz 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/web')
-rw-r--r-- | source3/web/swat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 95921c0b1d..65f8877bb3 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -996,10 +996,11 @@ static bool change_password(const char *remote_machine, const char *user_name, } if (remote_machine != NULL) { - ret = remote_password_change(remote_machine, user_name, old_passwd, - new_passwd, err_str, sizeof(err_str)); - if(*err_str) + ret = remote_password_change(remote_machine, user_name, + old_passwd, new_passwd, &err_str); + if (err_str != NULL) printf("%s\n<p>", err_str); + SAFE_FREE(err_str); return NT_STATUS_IS_OK(ret); } |