summaryrefslogtreecommitdiff
path: root/modules/pam_filter
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_filter')
-rw-r--r--modules/pam_filter/pam_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_filter/pam_filter.c b/modules/pam_filter/pam_filter.c
index 2f290fd5..da98148f 100644
--- a/modules/pam_filter/pam_filter.c
+++ b/modules/pam_filter/pam_filter.c
@@ -177,8 +177,8 @@ static int process_args(pam_handle_t *pamh
#define USER_OFFSET 5 /* strlen('USER='); */
#define USER_NAME "USER="
- pam_get_user(pamh, &user, NULL);
- if (user == NULL) {
+ if (pam_get_user(pamh, &user, NULL) != PAM_SUCCESS ||
+ user == NULL) {
user = "<unknown>";
}
size = USER_OFFSET+strlen(user);