All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Patch to libsemanage to remove labeling of /root
Date: Tue, 13 Jan 2009 08:43:50 -0500	[thread overview]
Message-ID: <496C9A96.1080805@redhat.com> (raw)

[-- 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 --]

             reply	other threads:[~2009-01-13 13:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 13:43 Daniel J Walsh [this message]
2009-02-17 20:25 ` Patch to libsemanage to remove labeling of /root 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496C9A96.1080805@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.