diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
commit | ea839a52aebd6a29a8dde70412b0e7b8d68568b4 (patch) | |
tree | 10026e84c8b73d4e5ad6704ab1cb78ea7c63c305 /lib/commonio.c | |
parent | 6c1662a897fd34b5b0b0174ab83552b016d05e8d (diff) | |
download | shadow-upstream/4.1.5.1.tar.gz |
Imported Upstream version 4.1.5.1upstream/4.1.5.1upstream
Diffstat (limited to 'lib/commonio.c')
-rw-r--r-- | lib/commonio.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/commonio.c b/lib/commonio.c index 60bcd83..6b6ce7b 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -32,7 +32,7 @@ #include <config.h> -#ident "$Id: commonio.c 3655 2011-12-09 22:13:02Z nekral-guest $" +#ident "$Id: commonio.c 3727 2012-05-18 19:44:53Z nekral-guest $" #include "defines.h" #include <assert.h> @@ -977,6 +977,12 @@ int commonio_close (struct commonio_db *db) 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 @@ int commonio_close (struct commonio_db *db) goto fail; } +#ifdef WITH_SELINUX + if (reset_selinux_file_context () != 0) { + goto fail; + } +#endif + nscd_need_reload = true; goto success; fail: |