aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriahmad <Unknown>2013-03-19 05:09:52 +0000
committeriahmad <Unknown>2013-03-19 05:09:52 +0000
commitffb3ffe818c5444c3407ec79565a99db53397a2d (patch)
tree5b661386d7dd91ebc45525a1c0db97839344e3ae
parent749ee321ed3560c4d3889476fc86e3fbf75d89b1 (diff)
downloadlibpam-freerdp2-ffb3ffe818c5444c3407ec79565a99db53397a2d.tar.gz
libpam-freerdp2-ffb3ffe818c5444c3407ec79565a99db53397a2d.tar.bz2
libpam-freerdp2-ffb3ffe818c5444c3407ec79565a99db53397a2d.zip
Empty password is not supported by xfreerdp, stop the authentication as soon as encounter an empty password
-rw-r--r--src/pam-freerdp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 8979e6e..ff09ce4 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -120,6 +120,11 @@ get_item (pam_handle_t * pamh, int type)
}
if (type == PAM_AUTHTOK) {
+ if (strlen(promptval) == 0){
+ free(promptval);
+ return NULL;
+ }
+
if (mlock(promptval, strlen(promptval) + 1) != 0) {
free(promptval);
return NULL;