AC_DEFINE([LOGIN_STAT_MAIL], [1], [Should login stat() the mailbox?])
])
+AC_ARG_ENABLE([login-lastlog],
+ AS_HELP_STRING([--enable-login-lastlog], [program login writes lastlog entries]),
+ [], [enable_login_lastlogin=no]
+)
+
+AS_IF([test "x$enable_login_lastlogin" != xno], [
+ AC_DEFINE([USE_LOGIN_LASTLOG],
+ [1],
+ [Define if program login writes lastlog entries])
+])
AC_ARG_ENABLE([nologin],
AS_HELP_STRING([--disable-nologin], [do not build nologin]),
# define log_audit(cxt, status)
#endif /* HAVE_LIBAUDIT */
+#ifdef USE_LOGIN_LASTLOG
static void log_lastlog(struct login_context *cxt)
{
struct sigaction sa, oldsa_xfsz;
sigaction(SIGXFSZ, &oldsa_xfsz, NULL); /* restore original setting */
}
+#else
+# define log_lastlog(cxt)
+#endif /* USE_LOGIN_LASTLOG */
/*
* Update wtmp and utmp logs.
conf.set('HAVE_LIBLASTLOG2', build_liblastlog2 ? 1 : false)
summary('liblastlog2', build_liblastlog2 ? 'enabled' : 'disabled', section : 'components')
+login_lastlogin = get_option('login-lastlogin')
+conf.set('USE_LOGIN_LASTLOG', login_lastlogin ? 1 : false)
+summary('login-lastlogin', login_lastlogin ? 'enabled' : 'disabled', section : 'components')
+
have_mountfd_api = cc.sizeof('struct mount_attr', prefix : '#include <linux/mount.h>') > 0
conf.set('HAVE_STRUCT_MOUNT_ATTR', have_mountfd_api ? 1 : false)
conf.set('HAVE_MOUNTFD_API', have_mountfd_api ? 1 : false)
option('lastlog-compat-symlink', type : 'boolean',
value : 'false',
description : 'create lastlog compat symlink')
+option('login-lastlogin', type : 'boolean',
+ value : 'false',
+ description : 'program login writes lastlog entries')