updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / pam_ssh / log.patch
blob7999f46cd2f71756c4bf828bd58506888c10c9b8
1 --- pam_ssh.c.orig 2009-03-21 22:19:27.467917906 +0100
2 +++ pam_ssh.c 2009-03-21 22:20:34.881215128 +0100
3 @@ -126,6 +126,28 @@ enum {
4 #endif
5 };
7 +extern int log_debug;
9 +/*
10 + * Generic logging function.
11 + */
13 +void
14 +pam_ssh_log(int priority, const char *fmt, ...)
16 + va_list ap; /* variable argument list */
18 + /* don't log LOG_DEBUG priority unless
19 + * PAM debug option is set */
20 + if (priority != LOG_DEBUG || log_debug) {
21 + openlog(PACKAGE_NAME, LOG_PID, LOG_AUTHPRIV);
22 + va_start(ap, fmt);
23 + vsyslog(priority, fmt, ap);
24 + va_end(ap);
25 + closelog();
26 + }
29 static struct opttab other_options[] = {
30 { PAM_OPT_KEYFILES_NAME, PAM_OPT_KEYFILES },
31 { PAM_OPT_BLANK_PASSPHRASE_NAME, PAM_OPT_BLANK_PASSPHRASE },