From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-849707-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 521901384B4
	for <garchives@archives.gentoo.org>; Wed,  2 Dec 2015 15:45:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 712F521C0C7;
	Wed,  2 Dec 2015 15:45:34 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A424421C0C7
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Dec 2015 15:45:33 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id AA3F0340988
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Dec 2015 15:45:27 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1B5F7F52
	for <gentoo-commits@lists.gentoo.org>; Wed,  2 Dec 2015 15:45:24 +0000 (UTC)
From: "Sven Vermeulen" <swift@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, "Sven Vermeulen" <swift@gentoo.org>
Message-ID: <1448286051.476723f5d02b3222109358f99c9d76ede915e71b.swift@gentoo>
Subject: [gentoo-commits] proj/hardened-refpolicy:swift commit in: policy/modules/contrib/
X-VCS-Repository: proj/hardened-refpolicy
X-VCS-Files: policy/modules/contrib/salt.te
X-VCS-Directories: policy/modules/contrib/
X-VCS-Committer: swift
X-VCS-Committer-Name: Sven Vermeulen
X-VCS-Revision: 476723f5d02b3222109358f99c9d76ede915e71b
X-VCS-Branch: swift
Date: Wed,  2 Dec 2015 15:45:24 +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-Archives-Salt: 0668db04-a40e-4694-82bf-c7e32715c23d
X-Archives-Hash: eb4affd7b5104613d7e0989191a7894d

commit:     476723f5d02b3222109358f99c9d76ede915e71b
Author:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 12:28:43 2015 +0000
Commit:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
CommitDate: Mon Nov 23 13:40:51 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=476723f5

Use fowner for salt_minion_t

Enable the fowner capability for the salt minion so that directory
metadata can be updated (such as the mode).

For instance, when trying to set mode 755 on a directory, the following
came up in the salt minion log (and the operation failed):

  2015-11-22 13:18:01,242 [salt.state       ][ERROR   ][3290] Failed to
  change mode to 0775

In the audit logs, the following occurred:

  type=AVC msg=audit(1448194681.239:118): avc:  denied  { fowner } for
  pid=3290 comm="salt-minion" capability=3
  scontext=system_u:system_r:salt_minion_t:s0
  tcontext=system_u:system_r:salt_minion_t:s0 tclass=capability
  permissive=0

 policy/modules/contrib/salt.te | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/policy/modules/contrib/salt.te b/policy/modules/contrib/salt.te
index 2a4e84d..9a8a4ad 100644
--- a/policy/modules/contrib/salt.te
+++ b/policy/modules/contrib/salt.te
@@ -218,7 +218,7 @@ tunable_policy(`salt_master_read_nfs',`
 # salt_minion_t policy
 #
 
-allow salt_minion_t self:capability { fsetid chown dac_override dac_read_search net_admin setgid setuid sys_admin sys_nice sys_tty_config };
+allow salt_minion_t self:capability { fowner fsetid chown dac_override dac_read_search net_admin setgid setuid sys_admin sys_nice sys_tty_config };
 allow salt_minion_t self:capability2 block_suspend;
 allow salt_minion_t self:process { getsched setsched signal signull };
 allow salt_minion_t self:tcp_socket create_stream_socket_perms;