diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-09-06 13:08:14 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-09-06 13:08:14 +0000 |
commit | 702b6cce4459410d0bd872f9ea46899a5293dc63 (patch) | |
tree | 57c3cdf46c7853cecddb326209e6700cdba9ca98 /pam_fshadow/pam_fshadow.c | |
parent | c2e4becb1330eef73727dc12a3413b0e8dedc526 (diff) | |
download | pam-modules-702b6cce4459410d0bd872f9ea46899a5293dc63.tar.gz pam-modules-702b6cce4459410d0bd872f9ea46899a5293dc63.tar.bz2 |
Update
git-svn-id: file:///svnroot/pam-modules/trunk@37 56984be4-0537-0410-a56c-fcb268c96130
Diffstat (limited to 'pam_fshadow/pam_fshadow.c')
-rw-r--r-- | pam_fshadow/pam_fshadow.c | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/pam_fshadow/pam_fshadow.c b/pam_fshadow/pam_fshadow.c index cddaf3b..604b8b2 100644 --- a/pam_fshadow/pam_fshadow.c +++ b/pam_fshadow/pam_fshadow.c @@ -41,28 +41,6 @@ #include <common.c> -/* some syslogging */ - -static void -_pam_log(int err, const char *format, ...) -{ - va_list args; - - va_start(args, format); - vsyslog(err|LOG_AUTH, format, args); - va_end(args); -} - -static void -_pam_debug(const char *format, ...) -{ - va_list args; - - va_start(args, format); - vsyslog(LOG_AUTH|LOG_DEBUG, format, args); - va_end(args); -} - char *sysconfdir = SYSCONFDIR; static int cntl_flags = 0; @@ -82,21 +60,24 @@ _pam_parse(int argc, const char **argv) /* generic options */ - if (!strncmp(*argv,"debug",5)) { + if (!strncmp(*argv, "debug", 5)) { cntl_flags |= CNTL_DEBUG; if ((*argv)[5] == '=') - CNTL_SET_DEBUG_LEV(cntl_flags,atoi(*argv+6)); + CNTL_SET_DEBUG_LEV(cntl_flags, + atoi(*argv + 6)); else - CNTL_SET_DEBUG_LEV(cntl_flags,1); - } else if (!strcmp(*argv,"use_authtok")) + CNTL_SET_DEBUG_LEV(cntl_flags, 1); + } else if (!strncmp(*argv, "waitdebug", 9)) + WAITDEBUG(*argv + 9); + else if (!strcmp(*argv,"use_authtok")) cntl_flags |= CNTL_AUTHTOK; - else if (!strncmp(*argv, "sysconfdir=",11)) - sysconfdir = (char*) (*argv+11); + else if (!strncmp(*argv, "sysconfdir=", 11)) + sysconfdir = (char*) (*argv + 11); else if (!strcmp(*argv, "nopasswd")) cntl_flags |= CNTL_NOPASSWD; else _pam_log(LOG_ERR, - "pam_parse: unknown option; %s", *argv); + "unknown option: %s", *argv); } return cntl_flags; |