Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F652C43387 for ; Sat, 12 Jan 2019 08:04:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10249205F4 for ; Sat, 12 Jan 2019 08:04:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=perfinion-com.20150623.gappssmtp.com header.i=@perfinion-com.20150623.gappssmtp.com header.b="i8bwlAKg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725851AbfALIEC (ORCPT ); Sat, 12 Jan 2019 03:04:02 -0500 Received: from mail-pf1-f171.google.com ([209.85.210.171]:33178 "EHLO mail-pf1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfALIEC (ORCPT ); Sat, 12 Jan 2019 03:04:02 -0500 Received: by mail-pf1-f171.google.com with SMTP id c123so8049887pfb.0 for ; Sat, 12 Jan 2019 00:04:02 -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=jk2lYj3HzbSIjKHsTYPMYiv+lYiexbc28STsth/bDto=; b=i8bwlAKg2n2Foaumc/wOIdnVgLfXehkozBkx6ITdvUpkQ7KYGFFEI5Rk6NvhDHHhfZ J+ZlLcI4F7gTwh+o8/JX4R2GO4F1OiuB5m8IwR4uC/zG20Tkqv0Umfkqh0YXfxlk9ucf 7u+88vS+xK0BCco32oNEljL2iO9S+tqs7p15VDBn4FbeSpaPtKgHb/q+ayS/ICtP/sbH RkFjVx1Ik5NDYCcg9qFg3LLbKRkzVMEy3Fqz5UGyGnnAftzPznYp763TPWF8FegcwdB3 lStZy400TUKX0DCvq9NVvZCuMQBIKCuhepgBGtFEJ2LB8hLj5RAt/mfLjAHwYq3/pvvY rN8w== 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=jk2lYj3HzbSIjKHsTYPMYiv+lYiexbc28STsth/bDto=; b=tK+mfchz9ZI55SxMVxEpoQl4nhQmX/38IyW1a/hx748mHw03pZLxLLJxa7q0a4hnHV XeB/ydD+RN4SGZcCIrjTcAoq7sSUt3s/fWyKstJdAozf5763e3e9e+Sxs/X82VVQ2lJY k81T8/WeRz2Mr9mf5xcVEXWh08IRdSc/iRcZxO5x79D2XW+HgCuiv2sVUZH1IM7VyAaN BojFMeYbp+1kYolhY89Tdw6I1QTdachLCE/OLE+ZLKJgcLJrFphRzGSyQx7p8qZXqTnI 7sCfY4kHOX+KHCHdJn90DLFxBNKU4MNaFGdIicNo1sejeOqxpPVJyhV42zAw6WO0TPOs 4O8w== X-Gm-Message-State: AJcUukcvJT4kx0fsaP3C5WwoJkXKATDpQjNRvjTjaWNS6PrDNbDEvVE6 tMgk/eW8Ld5kE8c3s3QC87Om1h1JMLY= X-Google-Smtp-Source: ALg8bN57g07CNanzdNCCxhvLR4zYMjKpI5BIJCJkyrAnr4/U9N2vuiVFZ4LvzuEI5fxNWobRxfjq0A== X-Received: by 2002:a62:4851:: with SMTP id v78mr17862560pfa.97.1547280241208; Sat, 12 Jan 2019 00:04:01 -0800 (PST) Received: from localhost ([2406:3003:2002:40c2:7952:f8f0:5b6c:6fa3]) by smtp.gmail.com with ESMTPSA id y184sm109646743pgd.71.2019.01.12.00.04.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 00:04:00 -0800 (PST) From: Jason Zaman To: selinux-refpolicy@vger.kernel.org Cc: Jason Zaman Subject: [PATCH 4/5] userdomain: introduce userdom_user_home_dir_filetrans_user_cert Date: Sat, 12 Jan 2019 16:03:43 +0800 Message-Id: <20190112080344.10031-4-jason@perfinion.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190112080344.10031-1-jason@perfinion.com> References: <20190112080344.10031-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 Signed-off-by: Jason Zaman --- policy/modules/system/userdomain.if | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if index e7117976..5221bd13 100644 --- a/policy/modules/system/userdomain.if +++ b/policy/modules/system/userdomain.if @@ -2491,6 +2491,35 @@ interface(`userdom_user_home_content_filetrans',` files_search_home($1) ') +######################################## +## +## Automatically use the user_cert_t label for selected resources +## created in a users home directory +## +## +## +## Domain allowed access +## +## +## +## +## Resource type(s) for which the label should be used +## +## +## +## +## Name of the resource that is being created +## +## +# +interface(`userdom_user_home_dir_filetrans_user_cert',` + gen_require(` + type user_cert_t; + ') + + userdom_user_home_dir_filetrans($1, user_cert_t, $2, $3) +') + ######################################## ## ## Create objects in a user home directory -- 2.19.2