[gdm/gnome-3-28] Merge branch 'fix_issue_381' into 'master'
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-3-28] Merge branch 'fix_issue_381' into 'master'
- Date: Tue, 12 Jun 2018 09:41:56 +0000 (UTC)
commit 40be0d5aebea7499f1d69df7671b544e67251def
Author: Ray Strode <halfline gmail com>
Date: Tue Jun 12 09:40:08 2018 +0000
Merge branch 'fix_issue_381' into 'master'
daemon/gdm-session-record.c: open/close the utmp database
Closes #381
See merge request GNOME/gdm!1
(cherry picked from commit e8c9ba138f0944fa63678021effe9df55d8344cf)
086d68f2 daemon/gdm-session-record.c: open/close the utmp database
daemon/gdm-session-record.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/daemon/gdm-session-record.c b/daemon/gdm-session-record.c
index 487f1004..d2df5887 100644
--- a/daemon/gdm-session-record.c
+++ b/daemon/gdm-session-record.c
@@ -213,7 +213,9 @@ gdm_session_record_login (GPid session_pid,
/* Handle utmp */
#if defined(HAVE_GETUTXENT)
g_debug ("Adding or updating utmp record for login");
+ setutxent();
pututxline (&session_record);
+ endutxent();
#elif defined(HAVE_LOGIN)
login (&session_record);
#endif
@@ -256,7 +258,9 @@ gdm_session_record_logout (GPid session_pid,
/* Handle utmp */
#if defined(HAVE_GETUTXENT)
g_debug ("Adding or updating utmp record for logout");
+ setutxent();
pututxline (&session_record);
+ endutxent();
#elif defined(HAVE_LOGOUT)
logout (session_record.ut_line);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]