diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-21 17:42:52 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-21 17:42:52 -0800 |
commit | 7ef6c19074495110d5c0b698b05c4ee52a0744d6 (patch) | |
tree | 95c5b4fc4c4a2c36fc4327d19a3f0fb1596ff763 /source3/web | |
parent | 01acd4bb3833733f7487ad86ea6542239fe3c90b (diff) | |
download | samba-7ef6c19074495110d5c0b698b05c4ee52a0744d6.tar.gz samba-7ef6c19074495110d5c0b698b05c4ee52a0744d6.tar.bz2 samba-7ef6c19074495110d5c0b698b05c4ee52a0744d6.zip |
Remove pstrings from pam_smbpass - make local_password_change
return malloced strings.
Jeremy.
(This used to be commit f652fe2bdb7a3a36e83dcf4b08347543fdffb9f0)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/swat.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index e9ed0ded54..95921c0b1d 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -987,8 +987,8 @@ static bool change_password(const char *remote_machine, const char *user_name, int local_flags) { NTSTATUS ret; - pstring err_str; - pstring msg_str; + char *err_str = NULL; + char *msg_str = NULL; if (demo_mode) { printf("%s\n<p>", _("password change in demo mode rejected")); @@ -1008,14 +1008,16 @@ static bool change_password(const char *remote_machine, const char *user_name, return False; } - ret = local_password_change(user_name, local_flags, new_passwd, err_str, sizeof(err_str), - msg_str, sizeof(msg_str)); + ret = local_password_change(user_name, local_flags, new_passwd, + &err_str, &msg_str); - if(*msg_str) + if(msg_str) printf("%s\n<p>", msg_str); - if(*err_str) + if(err_str) printf("%s\n<p>", err_str); + SAFE_FREE(msg_str); + SAFE_FREE(err_str); return NT_STATUS_IS_OK(ret); } |