mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-28 14:00:45 +00:00
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@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
e4f49b120a
commit
1236eef264
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user