All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/3] reference policy: add "context" security class
@ 2006-10-05 18:05 Darrel Goeddel
  2006-10-05 18:49 ` Joshua Brindle
  2006-10-05 18:50 ` Christopher J. PeBenito
  0 siblings, 2 replies; 8+ messages in thread
From: Darrel Goeddel @ 2006-10-05 18:05 UTC (permalink / raw)
  To: SELinux List
  Cc: Daniel Walsh, Stephen Smalley, Joshua Brindle, Karl MacMillan,
	Linda Knippers, Christopher PeBenito

Define a new security class "context" and its permission "translate" for
use by the context translation daemon.  The bit of policy added to the
setrans_translate_context interface only allows for translation of
domains and file_contexts.  You can see how this is bad if you try to
ls -Z /dev.  I don't have a trick to allow TE access to every type other
than grabbing some "big" attributes, then listing every remaining type.
That obviously does not work in the modular policy model anyway.  Any
ideas on how we could maybe handle that one? (assuming that anyone else
does not want TE restriction on the translations :))  How about a
privilege to use '*' or '~' in typesets...


---


diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors
index 5d4f36a..1ef6041 100644
--- a/policy/flask/access_vectors
+++ b/policy/flask/access_vectors
@@ -632,3 +632,8 @@ class key
 	setattr
 	create
 }
+
+class context
+{
+	translate
+}
diff --git a/policy/flask/security_classes b/policy/flask/security_classes
index 57f49bc..53c0cf1 100644
--- a/policy/flask/security_classes
+++ b/policy/flask/security_classes
@@ -93,4 +93,6 @@ class packet
 # Kernel access key retention
 class key
 
+class context			# userspace
+
 # FLASK
diff --git a/policy/mls b/policy/mls
index 06085c5..325a2a5 100644
--- a/policy/mls
+++ b/policy/mls
@@ -617,4 +617,14 @@ mlsconstrain association { polmatch }
 	((( l1 dom l2 ) and ( h1 domby h2 )) or
 	 ( t2 == unlabeled_t ));
 
+
+
+
+#
+# MLS policy for the context class
+#
+
+mlsconstrain context translate
+	( h1 dom h2 );
+
 ') dnl end enable_mls
diff --git a/policy/modules/system/setrans.if b/policy/modules/system/setrans.if
index 9547503..d230770 100644
--- a/policy/modules/system/setrans.if
+++ b/policy/modules/system/setrans.if
@@ -22,4 +22,5 @@ interface(`setrans_translate_context',`
 	allow $1 setrans_var_run_t:sock_file rw_file_perms;
 	allow $1 setrans_var_run_t:dir search_dir_perms;
 	files_list_pids($1)
+	allow $1 { domain file_type }:context translate;
 ')

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

end of thread, other threads:[~2006-10-05 19:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 18:05 [RFC PATCH 1/3] reference policy: add "context" security class Darrel Goeddel
2006-10-05 18:49 ` Joshua Brindle
2006-10-05 19:20   ` Darrel Goeddel
2006-10-05 19:40     ` Stephen Smalley
2006-10-05 19:50       ` Darrel Goeddel
2006-10-05 19:47     ` Joshua Brindle
2006-10-05 18:50 ` Christopher J. PeBenito
2006-10-05 19:29   ` Darrel Goeddel

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.