summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-08-26 18:56:49 -0400
committerSimo Sorce <idra@samba.org>2008-08-26 18:56:49 -0400
commita1de4e988d7780f687bb7ed2288faf3dfbb9da71 (patch)
treeabc569f52f33efdf48135faf7f0c790601eef229 /source3/auth
parent5e7655fa27f7b2c9c54edfc25f86974dbdb23ea4 (diff)
parent95cc5ee395ab9d7f6f79d341ad20bc486c292a8d (diff)
downloadsamba-a1de4e988d7780f687bb7ed2288faf3dfbb9da71.tar.gz
samba-a1de4e988d7780f687bb7ed2288faf3dfbb9da71.tar.bz2
samba-a1de4e988d7780f687bb7ed2288faf3dfbb9da71.zip
Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit e038f1cf9fb305fc1e7a4189208e451d30aaa1f0)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/pampass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 58921bdf15..9345eed27a 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -63,6 +63,7 @@ typedef int (*smb_pam_conv_fn)(int, const struct pam_message **, struct pam_resp
* Macros to help make life easy
*/
#define COPY_STRING(s) (s) ? SMB_STRDUP(s) : NULL
+#define COPY_FSTRING(s) (s[0]) ? SMB_STRDUP(s) : NULL
/*******************************************************************
PAM error handler.
@@ -327,7 +328,7 @@ static int smb_pam_passchange_conv(int num_msg,
DEBUG(100,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: We actualy sent: %s\n", current_reply));
#endif
reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies].resp = COPY_STRING(current_reply);
+ reply[replies].resp = COPY_FSTRING(current_reply);
found = True;
break;
}
@@ -355,7 +356,7 @@ static int smb_pam_passchange_conv(int num_msg,
DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: We sent: %s\n", current_reply));
pwd_sub(current_reply, udp->PAM_username, udp->PAM_password, udp->PAM_newpassword);
reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies].resp = COPY_STRING(current_reply);
+ reply[replies].resp = COPY_FSTRING(current_reply);
#ifdef DEBUG_PASSWORD
DEBUG(100,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: We actualy sent: %s\n", current_reply));
#endif