From 118eac7edb554be7d28bde13a57fec359fcb12f1 Mon Sep 17 00:00:00 2001 From: ayin Date: Wed, 18 Jan 2006 16:34:53 +0000 Subject: [PATCH] *** empty log message *** --- src/feature.h | 5 +++++ src/logging.C | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/feature.h b/src/feature.h index fd9cb9b6..80a2be51 100644 --- a/src/feature.h +++ b/src/feature.h @@ -257,6 +257,11 @@ */ #define RESET_TTY_TO_COMMON_DEFAULTS +/* + * Only log in wtmp and lastlog files when we're a login shell (-ls option) + */ +#define LOG_ONLY_ON_LOGIN + /*--------------------------------BELL----------------------------------*/ /* * Disable all bell indications diff --git a/src/logging.C b/src/logging.C index 7c9d46dd..94fdee65 100644 --- a/src/logging.C +++ b/src/logging.C @@ -205,7 +205,9 @@ rxvt_ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname) #endif #ifdef WTMP_SUPPORT +#ifdef LOG_ONLY_ON_LOGIN if (login_shell) +#endif { # ifdef HAVE_STRUCT_UTMP # ifdef HAVE_UPDWTMP @@ -220,7 +222,9 @@ rxvt_ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname) } #endif #if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) +#ifdef LOG_ONLY_ON_LOGIN if (login_shell) +#endif rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname); #endif } @@ -279,7 +283,9 @@ rxvt_ptytty_unix::logout () * Write ending wtmp entry */ #ifdef WTMP_SUPPORT +#ifdef LOG_ONLY_ON_LOGIN if (login_shell) +#endif { # ifdef HAVE_STRUCT_UTMP # ifdef HAVE_UPDWTMP -- 2.34.1