[PATCH 08/92] restorecond: first user logged in is not noticed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This patch looks good to me. acked.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk44F+8ACgkQrlYvE4MpobMVSQCfaHbge37hKi20UVTJcM6AHbot
CVMAn1kYEoAPO20ivSarMep74igQEhg/
=p7dN
-----END PGP SIGNATURE-----
>From 3883fce88254aecbd5cefb4f269a68461d5c0e36 Mon Sep 17 00:00:00 2001
From: Chris Adams <cmadams@xxxxxxxxxx>
Date: Thu, 12 Aug 2010 14:51:28 -0500
Subject: [PATCH 08/92] restorecond: first user logged in is not noticed

The first user that logs in will not be caught by restorecond.  The utmp
checking function only returns that there was a change when the previous
list of users was non-NULL.

Here's a patch that works for me (this is against the latest Red Hat
Enterprise Linux 5 policycoreutils release, but I checked the current
source tree and the same problem is present):

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
---
 policycoreutils/restorecond/utmpwatcher.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/policycoreutils/restorecond/utmpwatcher.c b/policycoreutils/restorecond/utmpwatcher.c
index f182c22..feddb5a 100644
--- a/policycoreutils/restorecond/utmpwatcher.c
+++ b/policycoreutils/restorecond/utmpwatcher.c
@@ -72,8 +72,8 @@ unsigned int utmpwatcher_handle(int inotify_fd, int wd)
 	if (utmp_wd == -1)
 		exitApp("Error watching utmp file.");
 
+	changed = strings_list_diff(prev_utmp_ptr, utmp_ptr);
 	if (prev_utmp_ptr) {
-		changed = strings_list_diff(prev_utmp_ptr, utmp_ptr);
 		strings_list_free(prev_utmp_ptr);
 	}
 	return changed;
-- 
1.7.6

Attachment: 0008-restorecond-first-user-logged-in-is-not-noticed.patch.sig
Description: PGP signature


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux