From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 49E20C2D0CE for ; Tue, 21 Jan 2020 13:43:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 079E02070C for ; Tue, 21 Jan 2020 13:43:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="CzPoCNeu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728708AbgAUNnQ (ORCPT ); Tue, 21 Jan 2020 08:43:16 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:35686 "EHLO mail-qt1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbgAUNnQ (ORCPT ); Tue, 21 Jan 2020 08:43:16 -0500 Received: by mail-qt1-f180.google.com with SMTP id e12so2619785qto.2 for ; Tue, 21 Jan 2020 05:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=4vYDjB4GFh5fq/KaBLyIiib8gMyE11xzyuATO8JgxRc=; b=CzPoCNeugh9NIOqru44CHZfjir07aLJimPXK6F0ndN32dLFu+529enkGpSqJlPiojz TLiy8Q/61Bkpl1Q0u+J1Qws4ojkNTwrv5R5S54m7AhpPPhGsRjsFFA7SRjh79NVZUA2C W14eBr7TF0gQOrEeEQK7waiKwpAqAXci2e/Zg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4vYDjB4GFh5fq/KaBLyIiib8gMyE11xzyuATO8JgxRc=; b=F0k6mxsGVr8CZNeFK+a7BB3uqJOmIQLGapDxEldtp7vsftUu9Md/OLWs9qZ7J5ZgPK sYvmCluKgY7sOze18eWe++MoSIxW7QuMF8f/OpR1eWJYpFTL145CIy+DZTlz2pXSL87O YWYIjN7IKz5CTpYyr7hGrUkxZaQWWEOhv7r987ULUogMybtShl8YJMr3jZn8GY0Hj8Ms Yck6K8KFUlfSu3PsfxXFtdcVkx2sE0cQoauc7GF6RwJdAQpwZKSdSm0Isl81s74lAIcL ByHrWyOxdUGmrPKtXJki/b3TfRCmUUabFwn7BU/6D/g3oeWe9P24rGcyieBz3Y+RCVIZ SEZQ== X-Gm-Message-State: APjAAAUdfYn9Vdd7M519HM4+3BJ/bCk+QcqGUbNw1AUu1fCYD8CFS2u4 F5KsqGDKkUXDsVbLBm2wLCTZVRmvM1gMXg== X-Google-Smtp-Source: APXvYqwejip7239HJQTZpI1/Ncp5Zgj1WcmvIgIa3YUTUtvwcrFpe/4u7j+owAXIpkaCCJkvwSc2ig== X-Received: by 2002:ac8:8d6:: with SMTP id y22mr4322879qth.85.1579614195353; Tue, 21 Jan 2020 05:43:15 -0800 (PST) Received: from fedora.pebenito.net (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id k50sm19409927qtc.90.2020.01.21.05.43.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jan 2020 05:43:14 -0800 (PST) Subject: Re: [RFC] files: Make files_{relabel,manage}_non_security_types work on all file types To: Henrik Grindal Bakken , selinux-refpolicy@vger.kernel.org References: <20200117231500.59904-1-hgb@ifi.uio.no> From: Chris PeBenito Message-ID: Date: Tue, 21 Jan 2020 08:36:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200117231500.59904-1-hgb@ifi.uio.no> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 1/17/20 6:15 PM, Henrik Grindal Bakken wrote: > From: Henrik Grindal Bakken > > This is the same behavious as files_*_non_auth_types have. > --- > policy/modules/kernel/files.if | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if > index f1c9441..255d8a9 100644 > --- a/policy/modules/kernel/files.if > +++ b/policy/modules/kernel/files.if > @@ -652,7 +652,11 @@ interface(`files_manage_non_security_files',` > attribute non_security_file_type; > ') > > + manage_dirs_pattern($1, non_security_file_type, non_security_file_type) > manage_files_pattern($1, non_security_file_type, non_security_file_type) > + manage_lnk_files_pattern($1, non_security_file_type, non_security_file_type) > + manage_fifo_files_pattern($1, non_security_file_type, non_security_file_type) > + manage_sock_files_pattern($1, non_security_file_type, non_security_file_type) > ') > > ######################################## > @@ -671,7 +675,11 @@ interface(`files_relabel_non_security_files',` > attribute non_security_file_type; > ') > > + relabel_dirs_pattern($1, non_security_file_type, non_security_file_type) > relabel_files_pattern($1, non_security_file_type, non_security_file_type) > + relabel_lnk_files_pattern($1, non_security_file_type, non_security_file_type) > + relabel_fifo_files_pattern($1, non_security_file_type, non_security_file_type) > + relabel_sock_files_pattern($1, non_security_file_type, non_security_file_type) > ') > > ######################################## NAK. Access per object class is already split up across separate interfaces, so doing this would be confusing and prevent someone from getting file-only access. -- Chris PeBenito