summaryrefslogtreecommitdiff
path: root/modules/pam_localuser/pam_localuser.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_localuser/pam_localuser.c')
-rw-r--r--modules/pam_localuser/pam_localuser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/pam_localuser/pam_localuser.c b/modules/pam_localuser/pam_localuser.c
index e32ea6d7..ac51e4ef 100644
--- a/modules/pam_localuser/pam_localuser.c
+++ b/modules/pam_localuser/pam_localuser.c
@@ -52,6 +52,7 @@
#include <security/pam_modules.h>
#include <security/_pam_macros.h>
#include <security/pam_ext.h>
+#include "pam_inline.h"
#define MODULE_NAME "pam_localuser"
@@ -73,8 +74,10 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
}
}
for(i = 0; i < argc; i++) {
- if(strncmp("file=", argv[i], 5) == 0) {
- filename = argv[i] + 5;
+ const char *str;
+
+ if ((str = pam_str_skip_prefix(argv[i], "file=")) != NULL) {
+ filename = str;
if(debug) {
pam_syslog (pamh, LOG_DEBUG,
"set filename to \"%s\"",