summaryrefslogtreecommitdiff
path: root/modules/pam_group/pam_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_group/pam_group.c')
-rw-r--r--modules/pam_group/pam_group.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 8cd178c0..d9a35ea6 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -1,6 +1,6 @@
-/* pam_group module */
-
/*
+ * pam_group module
+ *
* Written by Andrew Morgan <morgan@linux.kernel.org> 1996/7/6
* Field parsing rewritten by Tomas Mraz <tm@t8m.info>
*/
@@ -35,15 +35,6 @@
typedef enum { AND, OR } operator;
-/*
- * here, we make definitions for the externally accessible functions
- * in this file (these definitions are required for static modules
- * but strongly encouraged generally) they are used to instruct the
- * modules include file to define their prototypes.
- */
-
-#define PAM_SM_AUTH
-
#include <security/pam_modules.h>
#include <security/_pam_macros.h>
#include <security/pam_modutil.h>
@@ -183,6 +174,7 @@ read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *state)
++src; /* skip it */
break;
}
+ /* fallthrough */
default:
*to++ = c;
onspace = 0;
@@ -297,6 +289,7 @@ logic_field (const pam_handle_t *pamh, const void *me,
return FALSE;
}
next = VAL;
+ not = FALSE;
}
at += l;
}
@@ -778,9 +771,8 @@ pam_sm_setcred (pam_handle_t *pamh, int flags,
/* set username */
- if (pam_get_user(pamh, &user, NULL) != PAM_SUCCESS || user == NULL
- || *user == '\0') {
- pam_syslog(pamh, LOG_ERR, "cannot determine the user's name");
+ if (pam_get_user(pamh, &user, NULL) != PAM_SUCCESS || *user == '\0') {
+ pam_syslog(pamh, LOG_NOTICE, "cannot determine user name");
return PAM_USER_UNKNOWN;
}