* lib/commonio.c: Fix labeling of /etc/{passwd,shadow,group,gshadow}.
It will basically label them with same context as /etc/{passwd+,shadow+,group+,gshadow+}
This commit is contained in:
parent
1e0450dfb1
commit
56845ad1c1
@ -1,3 +1,9 @@
|
|||||||
|
2012-05-18 Peter Vrabec <pvrabec@redhat.com>
|
||||||
|
|
||||||
|
* lib/commonio.c: Fix labeling of /etc/{passwd,shadow,group,gshadow}.
|
||||||
|
It will basically label them with same context as
|
||||||
|
/etc/{passwd+,shadow+,group+,gshadow+}
|
||||||
|
|
||||||
2012-05-18 Nicolas François <nicolas.francois@centraliens.net>
|
2012-05-18 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/pwunconv.c: Do not check spw_close() return value (file is
|
* src/pwunconv.c: Do not check spw_close() return value (file is
|
||||||
|
@ -977,6 +977,12 @@ int commonio_close (struct commonio_db *db)
|
|||||||
|
|
||||||
snprintf (buf, sizeof buf, "%s+", db->filename);
|
snprintf (buf, sizeof buf, "%s+", db->filename);
|
||||||
|
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
|
if (set_selinux_file_context (buf) != 0) {
|
||||||
|
errors++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
db->fp = fopen_set_perms (buf, "w", &sb);
|
db->fp = fopen_set_perms (buf, "w", &sb);
|
||||||
if (NULL == db->fp) {
|
if (NULL == db->fp) {
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -1011,6 +1017,12 @@ int commonio_close (struct commonio_db *db)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
|
if (reset_selinux_file_context () != 0) {
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nscd_need_reload = true;
|
nscd_need_reload = true;
|
||||||
goto success;
|
goto success;
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user