diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-05-01 21:44:59 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-05-21 16:51:52 +0000 |
commit | be3030d76bf1fef7974a8063c75a46cf5668c396 (patch) | |
tree | 9752752ea98117b1c8daf8acde41a6959aa9ffc0 /modules/pam_localuser | |
parent | 1b9a74bd77740df08b87b225ea70afcfaa02636d (diff) | |
download | pam-be3030d76bf1fef7974a8063c75a46cf5668c396.tar.gz pam-be3030d76bf1fef7974a8063c75a46cf5668c396.tar.bz2 pam-be3030d76bf1fef7974a8063c75a46cf5668c396.zip |
pam_localuser: log unrecognized options
* modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Log
unrecognized options.
Diffstat (limited to 'modules/pam_localuser')
-rw-r--r-- | modules/pam_localuser/pam_localuser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/pam_localuser/pam_localuser.c b/modules/pam_localuser/pam_localuser.c index 2aa60600..a4cf94fb 100644 --- a/modules/pam_localuser/pam_localuser.c +++ b/modules/pam_localuser/pam_localuser.c @@ -76,6 +76,11 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, for(i = 0; i < argc; i++) { const char *str; + if (strcmp("debug", argv[i]) == 0) { + /* Already processed. */ + continue; + } + if ((str = pam_str_skip_prefix(argv[i], "file=")) != NULL) { filename = str; if(debug) { @@ -83,6 +88,9 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, "set filename to \"%s\"", filename); } + } else { + pam_syslog(pamh, LOG_ERR, "unrecognized option: %s", + argv[i]); } } |