[Pkg-shadow-commits] r3727 - in upstream/trunk: . lib
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Fri May 18 19:44:53 UTC 2012
Author: nekral-guest
Date: 2012-05-18 19:44:53 +0000 (Fri, 18 May 2012)
New Revision: 3727
Modified:
upstream/trunk/ChangeLog
upstream/trunk/lib/commonio.c
Log:
* 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+}
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2012-05-18 19:32:32 UTC (rev 3726)
+++ upstream/trunk/ChangeLog 2012-05-18 19:44:53 UTC (rev 3727)
@@ -1,3 +1,9 @@
+2012-05-18 Peter Vrabec <pvrabec at 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 at centraliens.net>
* src/pwunconv.c: Do not check spw_close() return value (file is
Modified: upstream/trunk/lib/commonio.c
===================================================================
--- upstream/trunk/lib/commonio.c 2012-05-18 19:32:32 UTC (rev 3726)
+++ upstream/trunk/lib/commonio.c 2012-05-18 19:44:53 UTC (rev 3727)
@@ -977,6 +977,12 @@
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);
if (NULL == db->fp) {
goto fail;
@@ -1011,6 +1017,12 @@
goto fail;
}
+#ifdef WITH_SELINUX
+ if (reset_selinux_file_context () != 0) {
+ goto fail;
+ }
+#endif
+
nscd_need_reload = true;
goto success;
fail:
More information about the Pkg-shadow-commits
mailing list