From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D40F51F47C for ; Thu, 5 Jan 2023 08:56:55 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=P8T4OFtz; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDM37-000427-72; Thu, 05 Jan 2023 03:56:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDM34-0003zm-9R for bug-gnulib@gnu.org; Thu, 05 Jan 2023 03:56:30 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDM31-0006da-0q for bug-gnulib@gnu.org; Thu, 05 Jan 2023 03:56:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1672908970; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=SxZ64nC2lKo5l1VLiPCZh4qba+p6lCyZoDxTeH+XkVs=; b=P8T4OFtzhdhfrcCUHtKsZKowS98oZSv3mchNyu/EuFO1egVKgbmzw4Q7DmpS23Fsbr rmh8RQpzXYH0oOTDMAPSfPPXJrJZZOG8E9gtrNJXu1REv+myzwVTRTOeQkHf5A2AJ4Ng iSlXqWRbkaUKQtVcN5waU5WVThktFk8z8ruUmelelGMj4cpPAxLCve6FJbIiE0HJzKmE BqyEqecL+JLS8ru3I8/0oov00XT2JC9ObEb4Expy5I3tXkm6vQ2kPiSmCYA1sYhAG8ZL 4lJViifdAXAQwd0E+WKDCEgF2P6M3C8YaApFOvknCkLxBHZzPjsAeu+BGlleExkGlOYe QseQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPEjvSMaFwOTzHq6UcGazM/iGXvXw==" X-RZG-CLASS-ID: mo00 Received: from nimes.localnet by smtp.strato.de (RZmta 48.2.1 AUTH) with ESMTPSA id t05890z058u98sp (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 5 Jan 2023 09:56:09 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org, Ondrej Valousek , Paul Eggert Subject: Re: [PATCH] Use xattr (Linux) in qcopy-acl.c Date: Thu, 05 Jan 2023 09:56:09 +0100 Message-ID: <2520566.AOvM4ru3NT@nimes> In-Reply-To: References: <20230104143425.1235741-1-ondrej.valousek.xm@renesas.com> <10191473.L8ug28u51p@nimes> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.21; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Paul Eggert wrote: > I see a problem in linking. With this change, programs using the > qcopy-acl module will link to both $(LIB_ACL) and $(LIB_XATTR), even > though they do not need to link with $(LIB_ACL). Perhaps you can fix > this by fixing the Link sections of the relevant modules to use > $(LIB_HAS_ACL) instead of $(LIB_ACL). Good point. But I would call this variable $(COPY_ACL_LIB). Our convention for these variables is generally - $(LIBFOO) or $(LIB_FOO) for the library -lfoo (or empty if nonexistent or not needed), - $(MODULE_LIB) for the libraries needed by a given module. For example, we have $(GETADDRINFO_LIB) $(GETHOSTNAME_LIB) $(GETLOADAVG_LIBS) $(INET_NTOP_LIB) $(PTY_LIB) $(YIELD_LIB) > Also, come to think of it, is there a security issue between the > chmod_or_fchmod call, and the attr_copy_fd call? That is, could the file > temporarily be set to too-generous permissions, between the two calls? For the use of qcopy_acl by copy-file.c, there is no issue, because when qcopy_acl gets called, the new file has mode 0600 and the owner and group are already set. So, this is not too generous. But for the uses of copy_acl in coreutils, I can't really tell... Bruno