All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch to libselinux to add svirt/virtual_domain context files.
@ 2009-03-04 20:30 Daniel J Walsh
  0 siblings, 0 replies; only message in thread
From: Daniel J Walsh @ 2009-03-04 20:30 UTC (permalink / raw)
  To: SE Linux

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-04 20:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 20:30 Patch to libselinux to add svirt/virtual_domain context files 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.