From 907d6b5138a7660cad96649160f84f29bd3430fe Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sep 21 2011 21:24:55 +0000 Subject: fix wtmp loading --- diff --git a/accountsservice.spec b/accountsservice.spec index c2459e6..993eb2f 100644 --- a/accountsservice.spec +++ b/accountsservice.spec @@ -1,7 +1,7 @@ Name: accountsservice Version: 0.6.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: D-Bus interfaces for querying and manipulating user account information Group: System Environment/Daemons @@ -20,6 +20,8 @@ BuildRequires: gobject-introspection-devel Requires: polkit Requires: shadow-utils +Patch0: fix-wtmp-loading.patch + %package libs Summary: Client-side library to talk to accountservice Group: Development/Libraries @@ -49,6 +51,7 @@ of these interfaces, based on the useradd, usermod and userdel commands. %prep %setup -q +%patch0 -p1 -b .fix-wtmp-loading %build %configure @@ -87,6 +90,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a %{_datadir}/gir-1.0/AccountsService-1.0.gir %changelog +* Wed Sep 21 2011 Ray Strode 0.6.14-2 +- Fix wtmp loading so users coming from the network are + remembered in the user list in subsequent boots + * Wed Sep 21 2011 Ray Strode 0.6.14-1 - Update to 0.6.14 diff --git a/fix-wtmp-loading.patch b/fix-wtmp-loading.patch new file mode 100644 index 0000000..bb9d914 --- /dev/null +++ b/fix-wtmp-loading.patch @@ -0,0 +1,29 @@ +From b73f539602f74271650a102d90253dc697488478 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 21 Sep 2011 17:20:24 -0400 +Subject: [PATCH] daemon: load wtmp after passwd file + +The passwd file handling code clears the list of loaded +users so we need to always do wtmp on top of it, instead of +before it. +--- + src/daemon.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index 79915a7..99ee161 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -427,8 +427,8 @@ reload_data (Daemon *daemon) + static void + reload_users (Daemon *daemon) + { +- reload_wtmp_history (daemon); + reload_passwd (daemon); ++ reload_wtmp_history (daemon); + reload_data (daemon); + } + +-- +1.7.6.2 +