Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp294372rdb; Sat, 30 Sep 2023 05:05:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEA/KAzLYyO1tVXI12kj/4UQUaRKZLts52LVSIQXQpnmSq/CA9gaH+aHIX+VGmYRqWXCE+i X-Received: by 2002:a17:90a:8584:b0:274:99e7:217e with SMTP id m4-20020a17090a858400b0027499e7217emr6040008pjn.16.1696075520807; Sat, 30 Sep 2023 05:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696075520; cv=none; d=google.com; s=arc-20160816; b=G1ylF6HZbU+QG2ZW1oT/cTP+CFDHts+nVq0vDgvcViW6k5i7gLkagZrV3MMkdAy5xz 1r/Ih88naLE3C8AQLLNEHGhyaYWh1tgW1woLX6bXJ9Pc0C7XBwULNpmdWxJWBAFdEMGl saW1CYd0kAlY71BgDWvkZGXDvaLMDFiftc6CdTBXocA8nGNQhX1q3hxR44EtdhOsi74J SidJTPWDK1mbfHbiApHQlpr832sI4JjJcl5BOHQS1h5v34piOZTdIY0e0DOaNpdhMIC9 Q4naKy4MbsE0RDiZYfhi7QlhP2ZJGRnDbcZwZx59JSWITVa/fa0FJR0IA4afcznQVh18 XeaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=2iftmMHTi/YaWclv9sInJ+UrxcpJODlP8J5T3eCjfCw=; fh=iR0b/HgGI8W6AArJxb8ZqD7gagxJsPp7yUsT4DVsnAs=; b=JH2lAZpP4igU5Z5cZWiwnJLJJDZen84Aug8zv+nEvo9WJiwLECFq+6cTDbXE9tVHO+ g89AsMP1i5/Kn+AJ4Qola7TID74IOYdG+isYE2i6XwDDbokBHZquBC/5MDwA7I0VIzMY j1SdhqVpQPKUvrRFrCfT0cbJXCw/i/qLi1Q41RvuUWo6wyGJJgjLrU/KcmWYz0D1UJ4O nV3xpRs6U7jmYeL/sup0KZkli1GHDp5NtwFdON2jZCYD3ab/3x8t2efmGuHxqD2C/jho yqAEsKhbzf5L2bTxM+lPdzdxccYaKL0M/Nqdktdylk9p/qvhS6q+GIAFp6Bh+xhSddvL +5eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=SuIOdDzF; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id rm6-20020a17090b3ec600b0026b51ae4574si3938989pjb.36.2023.09.30.05.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 05:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=SuIOdDzF; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8DF108078CA8; Sat, 30 Sep 2023 04:55:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjI3Lzo (ORCPT + 22 others); Sat, 30 Sep 2023 07:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjI3Lzn (ORCPT ); Sat, 30 Sep 2023 07:55:43 -0400 Received: from smtp.sws.net.au (smtp.sws.net.au [144.76.186.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37EE5D6 for ; Sat, 30 Sep 2023 04:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1696074937; bh=2iftmMHTi/YaWclv9sInJ+UrxcpJODlP8J5T3eCjfCw=; l=1386; h=From:To:Subject:Date:From; b=SuIOdDzFTj8f1mP+FUs5pPoFr7ELmENOfHlttW3Jv6g49y6sdmK5Q5eu498XzxPDN BLqjsHgbll2DbBMYpnZcTh34CtZOBlOZINf+SmriqQAnBifM0EZry1t7hXlpX1TCmT Od2I4zmZzf/3iPzom6nkpbBXKQrIirwStLPortMo= Received: from liv.coker.com.au (unknown [IPv6:2001:4479:5805:1700:8ac0:a192:f595:284d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) (Authenticated sender: russell@coker.com.au) by smtp.sws.net.au (Postfix) with ESMTPSA id 4C3C4FBFC for ; Sat, 30 Sep 2023 21:55:35 +1000 (AEST) From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: append_lnk_files_pattern Date: Sat, 30 Sep 2023 21:55:29 +1000 Message-ID: <4932293.0VBMTVartN@cupcakke> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,TRACKER_ID autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 30 Sep 2023 04:55:43 -0700 (PDT) Why do we have the pattern append_lnk_files_pattern? It's not used anywhere in refpolicy along with write_lnk_files_pattern. The sesearch command shows only the following uses of append permission for lnk_file. # sesearch -A -c lnk_file -p append allow files_unconfined_type file_type:lnk_file { append create execmod execute getattr ioctl link lock map mounton open quotaon read relabelfrom relabelto rename setattr unlink watch write }; allow filesystem_unconfined_type filesystem_type:lnk_file { append create execmod execute getattr ioctl link lock map mounton open quotaon read relabelfrom relabelto rename setattr unlink watch write }; allow kern_unconfined proc_type:lnk_file { append create execmod execute getattr ioctl link lock map mounton open quotaon read relabelfrom relabelto rename setattr unlink watch write }; allow kern_unconfined unlabeled_t:lnk_file { append create execmod execute getattr ioctl link lock map mounton open quotaon read relabelfrom relabelto rename setattr unlink watch write }; I guess that the kern_unconfined stuff is related to the magic symlinks in / proc/PID directories. Is there any other way where a symlink can be appended? Does it make sense to have the append macros and the write macros with append permission included? -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/