summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2011-06-02 21:55:41 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2011-06-02 21:55:41 +0200
commit26747b9b490d190dd20543ea9cbde082ae667402 (patch)
tree685f9db583b3428a0d098e2c5acacfb3847f7e14 /modules
parent48590abce86b34e55c84f71424449f16d285eaf2 (diff)
Guard for pam_get_user() error in pam_filter module.
Diffstat (limited to 'modules')
-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);