All of lore.kernel.org
 help / color / mirror / Atom feed
From: bigon@debian.org (Laurent Bigonville)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [RFC] Add the security class and AV's needed for systemd
Date: Sat,  5 Jul 2014 15:59:55 +0200	[thread overview]
Message-ID: <1404568795-13434-2-git-send-email-bigon@debian.org> (raw)
In-Reply-To: <1404568795-13434-1-git-send-email-bigon@debian.org>

From: Laurent Bigonville <bigon@bigon.be>

The list of AV's has been built by grepping the systemd code for the
calls to selinux_unit_access_check() and selinux_access_check() macro.
---
 policy/flask/access_vectors      | 18 ++++++++++++++++++
 policy/flask/security_classes    |  3 +++
 policy/support/obj_perm_sets.spt |  5 +++++
 3 files changed, 26 insertions(+)

diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors
index a94b169..e0d3768 100644
--- a/policy/flask/access_vectors
+++ b/policy/flask/access_vectors
@@ -393,6 +393,14 @@ class system
 	syslog_mod
 	syslog_console
 	module_request
+	halt
+	reboot
+	status
+	start
+	stop
+	enable
+	disable
+	reload
 }
 
 #
@@ -865,3 +873,13 @@ inherits database
 	implement
 	execute
 }
+
+class service
+{
+	start
+	stop
+	status
+	reload
+	enable
+	disable
+}
diff --git a/policy/flask/security_classes b/policy/flask/security_classes
index 14a4799..fdd6307 100644
--- a/policy/flask/security_classes
+++ b/policy/flask/security_classes
@@ -131,4 +131,7 @@ class db_view			# userspace
 class db_sequence		# userspace
 class db_language		# userspace
 
+# systemd services
+class service
+
 # FLASK
diff --git a/policy/support/obj_perm_sets.spt b/policy/support/obj_perm_sets.spt
index 6e91317..38ae511 100644
--- a/policy/support/obj_perm_sets.spt
+++ b/policy/support/obj_perm_sets.spt
@@ -271,3 +271,8 @@ define(`server_stream_socket_perms', `{ client_stream_socket_perms listen accept
 # Keys
 #
 define(`manage_key_perms', `{ create link read search setattr view write } ')
+
+#
+# Service
+#
+define(`manage_service_perms', `{ start stop status reload enable disable } ')
-- 
2.0.1

  reply	other threads:[~2014-07-05 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05 13:59 [refpolicy] systemd security class and AV's Laurent Bigonville
2014-07-05 13:59 ` Laurent Bigonville [this message]
2014-07-08 12:30   ` [refpolicy] [RFC] Add the security class and AV's needed for systemd Christopher J. PeBenito
2014-07-08 13:16     ` Laurent Bigonville
2014-07-08 13:27       ` Christopher J. PeBenito
2014-07-08 13:28       ` Dominick Grift
2014-07-09 13:39     ` Laurent Bigonville
2014-07-05 16:21 ` [refpolicy] systemd security class and AV's Nicolas Iooss

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=1404568795-13434-2-git-send-email-bigon@debian.org \
    --to=bigon@debian.org \
    --cc=refpolicy@oss.tresys.com \
    /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.