Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4035658ybv; Sun, 16 Feb 2020 12:04:21 -0800 (PST) X-Google-Smtp-Source: APXvYqzbRTJuE6+0JESJmvEF54gRVZt4hfTrFszGl0gKXBZaguqbD7BwNeDbOx1vmsBNhAg4V4pb X-Received: by 2002:aca:2118:: with SMTP id 24mr8114830oiz.28.1581883461754; Sun, 16 Feb 2020 12:04:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581883461; cv=none; d=google.com; s=arc-20160816; b=g5vhbwIpHAWWyngJYVRoi7kfT2UeW25YtR9uADM5EsITLfOQBzOTYFf/KRuO+8BawG u+kll7hDUkN5sYVaacbSaZnGE4FSz5L+5erXqeJ2G01WuLsctgk5rsv6eygVunja2rPw B7OaoWMmEiIVgU8qGcYw922PEIJ5PtvQJEobE3mxhAmvYz9ujgcj5e9MfZv2JfVPNnFu Yf26qQcwdb+ax6o15O3QPbCi3hbokTTcipmlKI8SBj+eR7EMIbF4aPF3M6uHpT2JL7is h/AYRQO29fTzwDQKbFH0CeulMQ0b0f6nepDXexTVugt6kRr/wkgAhQZFn54XWVzu8beq o5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GLEiOj/FkbHcZi+u/AJVcRBpGe6ZncWu5cGcyhaZPYo=; b=HGdN0/Y/Ac7oPkSj4PU/3XwBf6MOdUDSaYMAVsUrg79QTytoGvxc9Di34qIND0AoMq ma+ZPAsN1CqpXVv0OFAc9dR/sEO4XreDfPa9/+xRJOB6Fyu52YXQkpkfbsB8kptTfKUx 5op/dDc6n6/ZwC7lLhH9/OLvBXEHY9cEWJetrt3dtVE1BqoMX1WICi3UiJVyfEj0wH82 RrbS+6NdS7cMeS0EqN/XheBv1ONWofX8zrSznCKiMR1IRIh3ap0C7MG/qnQZfTg9EBZL /+E42919HkFr+H4U69iVaqfUjF+/dQ/A6nki67hjSEn03qYfDQJ0aMQ5qBYc9I0TaTV0 19Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@perfinion-com.20150623.gappssmtp.com header.s=20150623 header.b=JA16d+8O; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22si5287396oij.35.2020.02.16.12.04.19; Sun, 16 Feb 2020 12:04:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@perfinion-com.20150623.gappssmtp.com header.s=20150623 header.b=JA16d+8O; spf=pass (google.com: best guess record for domain of selinux-refpolicy-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726020AbgBPUET (ORCPT + 13 others); Sun, 16 Feb 2020 15:04:19 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40992 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbgBPUET (ORCPT ); Sun, 16 Feb 2020 15:04:19 -0500 Received: by mail-pl1-f195.google.com with SMTP id t14so5851399plr.8 for ; Sun, 16 Feb 2020 12:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GLEiOj/FkbHcZi+u/AJVcRBpGe6ZncWu5cGcyhaZPYo=; b=JA16d+8OMjRrSBxkbZZBzZQdxc/eRC9ypq4X+qtZQKk9+nzNqh88aGHJ4gb/AQIUQ+ yVMFKb5ygOXUEvIw0rBWnR+lmkuLZ1jfSpOMMfEH+XJFswy+HyTFpoIl2XXF3In6qC3h VEuPqFgYL0hGlhZi086IXGeMRjESUDCCwOQSJ/Rwk8TC/OKlibUXxA4QjeBvX0W49I+9 IENFV+0W2RgzAb/EbNF8KC9x+je7mHr4ptGkLd4jfFvUQGua1SvDjyuNK+rcVFeJfj4U 8hQW2Vb4O+7Vas03R3JXqw/ZHQjVqZIrs8/1qNd3lzXURgRLMuBFd+Mzt5BtXu3aByap v77g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GLEiOj/FkbHcZi+u/AJVcRBpGe6ZncWu5cGcyhaZPYo=; b=Dg8aLW0d4OhGWJCbo7e3tK4WU40h0DvlJJwCjeryGK1JQIC7Ra9Qcm+Na75rhWPXCa hRTOLVEoHLgaMvYqXSJq0vkqIE9fuZazVO5ZgxhvIDm8aG57zjhjGSL4IawNJxlW8K19 SmYiCCg417mf/lNYHqCUuDsNVMYiTgdBmLDxphumqsKass3yqWo/bPKNppd7ThDmLyiK EM8jEDcED/4eUrcVs8Z5+rsVyoQ7TVnmVYG2A1Sat630TXmiLlbmHuGwaAc+Ksx/xLKx PH9mKRkGfVtSSTuLK3nf1NkbzMKGs5n3h/4BUNPHtHgDtxnHfVcOJgETe3pZX49sYLKf 7tPw== X-Gm-Message-State: APjAAAWOssLrKIlNsrteEFE19imPnsYf8zr7gBnutrhaH7ZXISqTMa4G aB9BdlrABnBBJggFRebLFRSwytnlO7c= X-Received: by 2002:a17:902:123:: with SMTP id 32mr13327798plb.38.1581883458428; Sun, 16 Feb 2020 12:04:18 -0800 (PST) Received: from localhost ([101.127.140.252]) by smtp.gmail.com with ESMTPSA id ev5sm14294601pjb.4.2020.02.16.12.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 12:04:17 -0800 (PST) From: Jason Zaman To: selinux-refpolicy@vger.kernel.org Cc: Jason Zaman Subject: [PATCH 10/10] gpg: add watch perms for agent Date: Mon, 17 Feb 2020 04:03:19 +0800 Message-Id: <20200216200319.39337-10-jason@perfinion.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200216200319.39337-1-jason@perfinion.com> References: <20200216200319.39337-1-jason@perfinion.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org avc: denied { watch } for pid=10668 comm="gpg-agent" path="/run/user/1000/gnupg" dev="tmpfs" ino=21988 scontext=staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023 tcontext=staff_u:object_r:gpg_runtime_t:s0 tclass=dir permissive=0 avc: denied { watch } for pid=10668 comm="gpg-agent" path="/home/jason/.gnupg" dev="zfs" ino=34432 scontext=staff_u:staff_r:gpg_agent_t:s0-s0:c0.c1023 tcontext=staff_u:object_r:gpg_secret_t:s0 tclass=dir permissive=0 Signed-off-by: Jason Zaman --- policy/modules/apps/gpg.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policy/modules/apps/gpg.te b/policy/modules/apps/gpg.te index 90508415..d007b6ac 100644 --- a/policy/modules/apps/gpg.te +++ b/policy/modules/apps/gpg.te @@ -229,9 +229,11 @@ manage_dirs_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t) manage_sock_files_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t) manage_files_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t) manage_lnk_files_pattern(gpg_agent_t, gpg_secret_t, gpg_secret_t) +allow gpg_agent_t gpg_secret_t:dir watch; manage_dirs_pattern(gpg_agent_t, gpg_runtime_t, gpg_runtime_t) userdom_user_runtime_filetrans(gpg_agent_t, gpg_runtime_t, dir, "gnupg") +allow gpg_agent_t gpg_runtime_t:dir watch; manage_dirs_pattern(gpg_agent_t, gpg_agent_tmp_t, gpg_agent_tmp_t) manage_files_pattern(gpg_agent_t, gpg_agent_tmp_t, gpg_agent_tmp_t) -- 2.24.1