summaryrefslogtreecommitdiff
path: root/modules/pam_ftp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_ftp')
-rw-r--r--modules/pam_ftp/pam_ftp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c
index 1c2f1456..30806f28 100644
--- a/modules/pam_ftp/pam_ftp.c
+++ b/modules/pam_ftp/pam_ftp.c
@@ -35,6 +35,7 @@
#include <security/pam_modules.h>
#include <security/_pam_macros.h>
#include <security/pam_ext.h>
+#include "pam_inline.h"
/* argument parsing */
@@ -49,18 +50,18 @@ _pam_parse(pam_handle_t *pamh, int argc, const char **argv, const char **users)
/* step through arguments */
for (ctrl=0; argc-- > 0; ++argv) {
+ const char *str;
/* generic options */
if (!strcmp(*argv,"debug"))
ctrl |= PAM_DEBUG_ARG;
- else if (!strncmp(*argv,"users=",6)) {
- *users = 6 + *argv;
- } else if (!strcmp(*argv,"ignore")) {
+ else if (!strcmp(*argv,"ignore"))
ctrl |= PAM_IGNORE_EMAIL;
- } else {
+ else if ((str = pam_str_skip_prefix(*argv, "users=")) != NULL)
+ *users = str;
+ else
pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
- }
}
return ctrl;