Commit 21b77a8c authored by Brian Cameron's avatar Brian Cameron Committed by Brian Cameron

Some trivial fixes. The #ifdef GETUTXENT got lost in the logout function.

2007-10-18  Brian Cameron  <brian.cameron@sun.com>

        * daemon/gdm-session-record.c: Some trivial fixes.  The #ifdef
          GETUTXENT got lost in the logout function.  It should match the
          login function.  Also make sure to set both tv_sec and tv_usec when
          doing logout.

svn path=/trunk/; revision=5387
parent 3a857810
2007-10-18 Brian Cameron <brian.cameron@sun.com>
* daemon/gdm-session-record.c: Some trivial fixes. The #ifdef
GETUTXENT got lost in the logout function. It should match the
login function. Also make sure to set both tv_sec and tv_usec when
doing logout.
2007-10-19 William Jon McCann <mccann@jhu.edu>
* common/gdm-signal-handler.c: (signal_io_watch), (catch_signal),
......
......@@ -236,6 +236,7 @@ gdm_session_record_login (GPid session_pid,
* Handle utmp
* Update if entry already exists
*/
#if defined(HAVE_GETUTXENT)
setutxent ();
while ((u = getutxent ()) != NULL) {
......@@ -256,6 +257,7 @@ gdm_session_record_login (GPid session_pid,
g_debug ("Adding new utmp record");
pututxline (&session_record);
}
#endif
}
void
......@@ -309,7 +311,8 @@ gdm_session_record_logout (GPid session_pid,
u->ut_type = DEAD_PROCESS;
#if defined(HAVE_UT_UT_TV)
u->ut_tv.tv_sec = session_record.ut_tv.tv_sec;
u->ut_tv.tv_sec = session_record.ut_tv.tv_sec;
u->ut_tv.tv_usec = session_record.ut_tv.tv_usec;
#elif defined(HAVE_UT_UT_TIME)
u->ut_time = session_record.ut_time;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment