]> granicus.if.org Git - shadow/commitdiff
* NEWS, src/userdel.c: Fixed SE Linux support. semanage should be
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 15 Apr 2009 21:14:08 +0000 (21:14 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 15 Apr 2009 21:14:08 +0000 (21:14 +0000)
called at the end.
* src/useradd.c: Always call selinux_update_mapping() (i.e.
semanage), not only when -Z is used.

ChangeLog
NEWS
src/useradd.c
src/userdel.c

index 0f9824b4ec4c34fb99954554bedde8383f15f095..f30defcac658f0ea37dde9cde603100dc77b65a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-15  Peter Vrabec <pvrabec@redhat.com>
+
+       * NEWS, src/userdel.c: Fixed SE Linux support. semanage should be
+       called at the end.
+       * src/useradd.c: Always call selinux_update_mapping() (i.e.
+       semanage), not only when -Z is used.
+
 2009-04-15  Peter Vrabec <pvrabec@redhat.com>
 
        * NEWS, srclib/getlong.c: Fix parsing of octal numbers.
diff --git a/NEWS b/NEWS
index 4067c818c0a0877b938f4f35cc4ffde55c24cffd..9e9cb8408dd4a2b8af1c503483476d4533e6f5ab 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,12 +8,14 @@ shadow-4.1.3 -> shadow-4.1.3.1                                                2009-04-15
   weirdly). Only shadow-4.1.3 was affected.
 
 *** general
+- login
+  * Fix regression when no user is specified on the command line.
+- userdel
+  * Fixed SE Linux support
 - vipw
   * SE Linux: Set the default context to the context of the file being
     edited. This ensures that the backup file inherit from the file's
     context.
-- login
-  * Fix regression when no user is specified on the command line.
 
 shadow-4.1.2.2 -> shadow-4.1.3                                         2009-04-12
 
index 25d2908b387b551b52c09463deedc6d47db2e109..261e9ca96b6d1a0600a537a2ed4f5dd06bccbc6d 100644 (file)
@@ -2010,9 +2010,7 @@ int main (int argc, char **argv)
        close_files ();
 
 #ifdef WITH_SELINUX
-       if (Zflg) {
-               selinux_update_mapping ();
-       }
+       selinux_update_mapping ();
 #endif
 
        nscd_flush_cache ("passwd");
index 9ac7a0ed47bc654b02685e33ebc93a8003715373..ae1aa4a521c16eeec45b34278bd73218d72c740e 100644 (file)
@@ -797,17 +797,6 @@ int main (int argc, char **argv)
        audit_help_open ();
 #endif
 
-#ifdef WITH_SELINUX
-       if (is_selinux_enabled () > 0) {
-               const char *args[5];
-               args[0] = "/usr/sbin/semanage";
-               args[1] = "login";
-               args[2] = "-d";
-               args[3] = user_name;
-               args[4] = NULL;
-               safe_system (args[0], args, NULL, 1);
-       }
-#endif
        /*
         * Get my name so that I can use it to report errors.
         */
@@ -1010,6 +999,18 @@ int main (int argc, char **argv)
        }
 #endif
 
+#ifdef WITH_SELINUX
+       if (is_selinux_enabled () > 0) {
+               const char *args[5];
+               args[0] = "/usr/sbin/semanage";
+               args[1] = "login";
+               args[2] = "-d";
+               args[3] = user_name;
+               args[4] = NULL;
+               safe_system (args[0], args, NULL, 1);
+       }
+#endif
+
        /*
         * Cancel any crontabs or at jobs. Have to do this before we remove
         * the entry from /etc/passwd.