Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3706595ybl; Tue, 21 Jan 2020 05:43:22 -0800 (PST) X-Google-Smtp-Source: APXvYqy6VAU2QzRAVCbqGM94/Sm9CbUzO1IdM7RZsWjYnw5j7yHigXH7fUdvlZ2NycZ525SzZcfs X-Received: by 2002:a9d:22:: with SMTP id 31mr3355433ota.173.1579614202217; Tue, 21 Jan 2020 05:43:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579614202; cv=none; d=google.com; s=arc-20160816; b=ynOUqEt7d25OKU3gXE/jaKwPSV3Wdx+PfYubfY0/+i/96kuTKGNCaGokT65zisvv4d 1jp0d1wsS58PxVxxhs2isyM9R99wNuRfIVE+3TNCSlE60BxOPD/Im3WgIP8Ra0SZqGLm u0ulF81N8GG7OGhusygdhrycYTQgRPVee47ZHt6xHsPSIY4pyG/ZdgCxFH3CnxCB91LJ XYjKlApMAXAOw2FzoJWy7gyVPNmB8nBLHgGQuWC0JyiHlKvumsgcIJpffqszz5TP90fu CkeXcPtBG9shG6QPCxkrw0iRgTupVFfFYQ//nFyHPo/Tm1AtV/vTqbhXeDNLDAddR+cM NZBw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=4vYDjB4GFh5fq/KaBLyIiib8gMyE11xzyuATO8JgxRc=; b=tSHFa5/f8KPz12k9coxQBcW/p3ZSPFgi1BWJaT00oueUTOnsY1F8QQt24Huc00xoTq PgiNCDipGunwSkvqCNch/QYjXBkfmGPNtVxLquVTsSoPixUSan0HZVoXltRmwtiU0+41 Hc1eUklxHxtsjBDUBMdm54VfWNZK6e6MnBRwUJoTipmd0a4V7iBf8ImXNp3nnkJfXFbD q+7paSJGxrrMT4J+/Ifuj398qKyM2d/2vRN1wEIP37BfV+uRCOIiHy6v+xHzeXfc1QXu 1/Io1fQlHYggiZR4wW3QvEByO8eD8j6nHUTcW+VU3I/d5xb++hhmtuRAy6/LjfYOj5/j 7bdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=CzPoCNeu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19si21722694otj.209.2020.01.21.05.43.17; Tue, 21 Jan 2020 05:43:22 -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=@ieee.org header.s=google header.b=CzPoCNeu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728708AbgAUNnQ (ORCPT + 13 others); 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-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