From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1247134-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B5C71382C5 for <garchives@archives.gentoo.org>; Mon, 1 Feb 2021 02:10:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D105CE09B5; Mon, 1 Feb 2021 02:10:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD6CBE09B5 for <gentoo-commits@lists.gentoo.org>; Mon, 1 Feb 2021 02:10:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 99813340D00 for <gentoo-commits@lists.gentoo.org>; Mon, 1 Feb 2021 02:10:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DCCD84B5 for <gentoo-commits@lists.gentoo.org>; Mon, 1 Feb 2021 02:10:08 +0000 (UTC) From: "Jason Zaman" <perfinion@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" <perfinion@gentoo.org> Message-ID: <1612142502.b39af892a3459615c9941f545574d9561db23ab2.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/samba.if X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: b39af892a3459615c9941f545574d9561db23ab2 X-VCS-Branch: master Date: Mon, 1 Feb 2021 02:10:08 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f6036cd0-f37b-4f3e-8a94-7c02cfe023ae X-Archives-Hash: 88585d6494228f9dc481ea5c759363e5 commit: b39af892a3459615c9941f545574d9561db23ab2 Author: Chris PeBenito <pebenito <AT> ieee <DOT> org> AuthorDate: Thu Jan 28 16:27:54 2021 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Mon Feb 1 01:21:42 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b39af892 samba: Move service interface definitions. Signed-off-by: Chris PeBenito <pebenito <AT> ieee.org> Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> policy/modules/services/samba.if | 152 +++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/policy/modules/services/samba.if b/policy/modules/services/samba.if index 5e01db23..6af30d0c 100644 --- a/policy/modules/services/samba.if +++ b/policy/modules/services/samba.if @@ -328,6 +328,82 @@ interface(`samba_read_share_files',` read_files_pattern($1, samba_share_t, samba_share_t) ') +######################################## +## <summary> +## start samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_start',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service start; +') + +######################################## +## <summary> +## stop samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_stop',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service stop; +') + +######################################## +## <summary> +## get status of samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_status',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service status; +') + +######################################## +## <summary> +## reload samba daemon +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`samba_reload',` + gen_require(` + type samba_unit_t; + ') + + allow $1 samba_unit_t:file getattr; + allow $1 samba_unit_t:service reload; +') + ######################################## ## <summary> ## Search samba var directories. @@ -729,79 +805,3 @@ interface(`samba_admin',` files_list_tmp($1) admin_pattern($1, { swat_tmp_t smbd_tmp_t winbind_tmp_t }) ') - -######################################## -## <summary> -## start samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_start',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service start; -') - -######################################## -## <summary> -## stop samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_stop',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service stop; -') - -######################################## -## <summary> -## get status of samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_status',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service status; -') - -######################################## -## <summary> -## reload samba daemon -## </summary> -## <param name="domain"> -## <summary> -## Domain allowed access. -## </summary> -## </param> -# -interface(`samba_reload',` - gen_require(` - type samba_unit_t; - ') - - allow $1 samba_unit_t:file getattr; - allow $1 samba_unit_t:service reload; -')