From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Patch to libselinux to add svirt/virtual_domain context files.
Date: Wed, 04 Mar 2009 15:30:36 -0500 [thread overview]
Message-ID: <49AEE4EC.6050002@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 527 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
libvirt/svirt is being released to Rawhide today. Needed to modify
libselinux to allow policy writers to define the default domain context
to run virtual images and and the default file context to label virtual
images.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmu5OsACgkQrlYvE4MpobMdKQCg3UXGHdCZ3HdNc5bQMbtnq2MK
IRYAn09zs3VTSeJb1IY+zJ5UV96sCPFh
=Kfww
-----END PGP SIGNATURE-----
[-- Attachment #2: libselinux-svirt.patch --]
[-- Type: text/plain, Size: 2943 bytes --]
diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.78/include/selinux/selinux.h
--- nsalibselinux/include/selinux/selinux.h 2009-01-05 17:45:35.000000000 -0500
+++ libselinux-2.0.78/include/selinux/selinux.h 2009-03-04 15:23:52.000000000 -0500
@@ -459,6 +459,8 @@
extern const char *selinux_file_context_local_path(void);
extern const char *selinux_homedir_context_path(void);
extern const char *selinux_media_context_path(void);
+extern const char *selinux_virtual_domain_context_path(void);
+extern const char *selinux_virtual_image_context_path(void);
extern const char *selinux_x_context_path(void);
extern const char *selinux_contexts_path(void);
extern const char *selinux_securetty_types_path(void);
diff --exclude-from=exclude -N -u -r nsalibselinux/src/file_path_suffixes.h libselinux-2.0.78/src/file_path_suffixes.h
--- nsalibselinux/src/file_path_suffixes.h 2009-01-05 17:45:35.000000000 -0500
+++ libselinux-2.0.78/src/file_path_suffixes.h 2009-03-04 15:23:52.000000000 -0500
@@ -20,3 +20,5 @@
S_(FILE_CONTEXTS_LOCAL, "/contexts/files/file_contexts.local")
S_(X_CONTEXTS, "/contexts/x_contexts")
S_(COLORS, "/secolor.conf")
+ S_(VIRTUAL_DOMAIN, "/contexts/virtual_domain_context")
+ S_(VIRTUAL_IMAGE, "/contexts/virtual_image_context")
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_config.c libselinux-2.0.78/src/selinux_config.c
--- nsalibselinux/src/selinux_config.c 2009-01-05 17:45:35.000000000 -0500
+++ libselinux-2.0.78/src/selinux_config.c 2009-03-04 15:23:52.000000000 -0500
@@ -40,7 +40,9 @@
#define SECURETTY_TYPES 18
#define X_CONTEXTS 19
#define COLORS 20
-#define NEL 21
+#define VIRTUAL_DOMAIN 21
+#define VIRTUAL_IMAGE 22
+#define NEL 23
/* New layout is relative to SELINUXDIR/policytype. */
static char *file_paths[NEL];
@@ -391,3 +393,17 @@
}
hidden_def(selinux_x_context_path)
+
+const char *selinux_virtual_domain_context_path()
+{
+ return get_path(VIRTUAL_DOMAIN);
+}
+
+hidden_def(selinux_virtual_domain_context_path)
+
+const char *selinux_virtual_image_context_path()
+{
+ return get_path(VIRTUAL_IMAGE);
+}
+
+hidden_def(selinux_virtual_image_context_path)
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_internal.h libselinux-2.0.78/src/selinux_internal.h
--- nsalibselinux/src/selinux_internal.h 2009-01-05 17:45:35.000000000 -0500
+++ libselinux-2.0.78/src/selinux_internal.h 2009-03-04 15:23:52.000000000 -0500
@@ -56,6 +56,8 @@
hidden_proto(selinux_securetty_types_path)
hidden_proto(selinux_failsafe_context_path)
hidden_proto(selinux_removable_context_path)
+ hidden_proto(selinux_virtual_domain_context_path)
+ hidden_proto(selinux_virtual_image_context_path)
hidden_proto(selinux_file_context_path)
hidden_proto(selinux_file_context_homedir_path)
hidden_proto(selinux_file_context_local_path)
[-- Attachment #3: libselinux-svirt.patch.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]
reply other threads:[~2009-03-04 20:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49AEE4EC.6050002@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.