*** empty log message ***
authorayin <ayin>
Wed, 18 Jan 2006 16:34:53 +0000 (16:34 +0000)
committerayin <ayin>
Wed, 18 Jan 2006 16:34:53 +0000 (16:34 +0000)
src/feature.h
src/logging.C

index fd9cb9b6c950564d63ce514415a590258d38f673..80a2be5171eef6797a56b3a457668863f65d6545 100644 (file)
  */
 #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
index 7c9d46dd8e4dab8e9b622c1a3acb9f49bbc185b2..94fdee65f124c34cb89c19082eb4a991d28577f9 100644 (file)
@@ -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