dnl XXX - quick hack, should disappear before anyone notices :).
dnl XXX - I just read the above message :).
-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
if test "$ac_cv_func_ruserok" = "yes"; then
AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
#endif
#endif
-#ifdef USE_SYSLOG
#include <syslog.h>
#ifndef LOG_WARN
#define SYSLOG(x) syslog x
#endif /* !ENABLE_NLS */
-#else /* !USE_SYSLOG */
-
-#define SYSLOG(x) /* empty */
-#define openlog(a,b,c) /* empty */
-#define closelog() /* empty */
-
-#endif /* !USE_SYSLOG */
-
/* The default syslog settings can now be changed here,
in just one place. */
#ifndef USE_PAM
PAMDEFS
#endif
-#ifdef USE_SYSLOG
{"SYSLOG_SG_ENAB", NULL},
{"SYSLOG_SU_ENAB", NULL},
-#endif
#ifdef WITH_TCB
{"TCB_AUTH_GROUP", NULL},
{"TCB_SYMLINKS", NULL},
exit (EXIT_FAILURE);
}
-#ifdef USE_SYSLOG
/*
* syslog_sg - log the change of group to syslog
*
free(free_login);
free(free_tty);
}
-#endif /* USE_SYSLOG */
/*
* newgrp - change the invokers current real and effective group id
* all successful validations pass through this point. The group id
* will be set, and the group added to the concurrent groupset.
*/
-#ifdef USE_SYSLOG
if (getdef_bool ("SYSLOG_SG_ENAB")) {
syslog_sg (name, group);
}
-#endif /* USE_SYSLOG */
gid = grp->gr_gid;
static /*@noreturn@*/void su_failure (const char *tty, bool su_to_root)
{
sulog (tty, false, caller_name, name); /* log failed attempt */
-#ifdef USE_SYSLOG
if (getdef_bool ("SYSLOG_SU_ENAB")) {
SYSLOG ((su_to_root ? LOG_NOTICE : LOG_INFO,
"- %s %s:%s", tty,
('\0' != name[0]) ? name : "???"));
}
closelog ();
-#endif
#ifdef WITH_AUDIT
audit_fd = audit_open ();
}
sulog (caller_tty, true, caller_name, name); /* save SU information */
-#ifdef USE_SYSLOG
if (getdef_bool ("SYSLOG_SU_ENAB")) {
SYSLOG ((LOG_INFO, "+ %s %s:%s", caller_tty,
('\0' != caller_name[0]) ? caller_name : "???",
('\0' != name[0]) ? name : "???"));
}
-#endif
#ifdef USE_PAM
/* set primary group id and supplementary groups */