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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF5B6E77371 for ; Sat, 30 Sep 2023 11:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjI3Lzo (ORCPT ); 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" Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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/