summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-11-23 12:04:35 +0100
committerJeremy Allison <jra@samba.org>2007-11-23 13:04:50 -0800
commitd2c2635a280b1bfbbcd52fa96bbeff3f60672c45 (patch)
tree1de5760414dafc0790ab62f9aa37c960707c0d1f /source3/web
parent450ca80b57b4271e31a70c2db0d325a0dd1699d1 (diff)
downloadsamba-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/web')
-rw-r--r--source3/web/swat.c7
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);
}