All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch to libsemanage to remove labeling of /root
@ 2009-01-13 13:43 Daniel J Walsh
  2009-02-17 20:25 ` Joshua Brindle
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel J Walsh @ 2009-01-13 13:43 UTC (permalink / raw)
  To: SE Linux

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Policy should label /root with one label and this should not be effected
by the passwd database.

In Fedora policy we label this as admin_home_t.  Having this label vary
depending on policy ends up with lines like

dontaudit * user_home_t:dir search_dir_perms
dontaudit * admin_home_t:dir search_dir_perms
dontaudit * sysadmin_home_t:dir search_dir_perms
dontaudit * staff_home_t:dir search_dir_perms

Labeling this directory as user_home_t, opens the system to possible
security risks since some domains have to be able to write to
user_home_t when they would never be allowed to write to admin_home_t.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAklslqMACgkQrlYvE4MpobPY/ACdHitHOeU+c77VVePxkkTpmSsw
M2gAoJxZPlUKHJ3cL0zIb8fuHMq5VSRz
=LmKq
-----END PGP SIGNATURE-----

[-- Attachment #2: libsemanage-root.patch --]
[-- Type: text/plain, Size: 642 bytes --]

diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.30/src/genhomedircon.c
--- nsalibsemanage/src/genhomedircon.c	2008-08-28 09:34:24.000000000 -0400
+++ libsemanage-2.0.30/src/genhomedircon.c	2009-01-12 10:29:24.000000000 -0500
@@ -794,6 +792,12 @@
 			 * /root */
 			continue;
 		}
+		if (strcmp(pwent->pw_dir, "/root") == 0) {
+			/* don't relabel / genhomdircon checked to see if root
+			 * was the user and if so, set his home directory to
+			 * /root */
+			continue;
+		}
 		if (push_user_entry(&head, name, seuname,
 				    prefix, pwent->pw_dir) != STATUS_SUCCESS) {
 			*errors = STATUS_ERR;

[-- Attachment #3: libsemanage-root.patch.sig --]
[-- Type: application/octet-stream, Size: 72 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2009-02-28 12:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13 13:43 Patch to libsemanage to remove labeling of /root Daniel J Walsh
2009-02-17 20:25 ` Joshua Brindle
2009-02-17 20:31   ` Daniel J Walsh
2009-02-17 20:32     ` Joshua Brindle
2009-02-17 20:39       ` Daniel J Walsh
2009-02-17 20:40         ` Joshua Brindle
2009-02-17 21:17           ` Daniel J Walsh
2009-02-18 15:47             ` Joshua Brindle
2009-02-18 16:09               ` Daniel J Walsh
2009-02-18 16:20                 ` Joshua Brindle
2009-02-18 16:28                   ` Daniel J Walsh
2009-02-18 16:57                   ` Daniel J Walsh
2009-02-18 19:21                     ` Joshua Brindle
2009-02-18 20:09                       ` Daniel J Walsh
2009-02-18 20:15                         ` Joshua Brindle
2009-02-18 21:25                           ` Daniel J Walsh
2009-02-18 21:42                             ` Joshua Brindle
2009-02-27  2:22                 ` Russell Coker
2009-02-27 22:08                   ` Daniel J Walsh
2009-02-27 23:01                     ` Russell Coker
2009-02-28 12:09                       ` Dominick Grift
2009-02-28 12:29                         ` Daniel J Walsh
2009-02-28 12:39                           ` Dominick Grift
2009-02-28 12:17                       ` Daniel J Walsh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.