From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id BEE1D3858C2B for ; Fri, 1 Sep 2023 12:22:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEE1D3858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1c11d53221cso1154549fac.2 for ; Fri, 01 Sep 2023 05:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693570975; x=1694175775; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fiK1vFAerqx62h3FROBtZBYwxxznsxxZMGhYfeBx1VE=; b=DPa3MghErWm9zQC6ZqA/tfMn0e9esGOYmgvYi8arch4mP8ZSQgsjWSnWCDMNpT5M0N m8sKPP2Jlqg7amjgxDrLizkXHePJwccV2R0zAc4Fos4lN4a98a+C4Cr+/He9riybOjWw ArVvfIJ22tsBWMEr0G7IwWXvmP2s7lO11HgRC3EOrq8ehZsYchm7QYTMmC+IPZJKQa8J ecFhokpb2WsosyKxHXTvUHh+gju9Q5LlU5cOp+vIT6SFRGKgVzNOTKyNpa+neixavyL8 qfLLMdFDv4R7IdRsSj9Hn86QdkyTKivd8CXBbneSRLqTW8AgKBWCSlYyM62R76tLdPwm HRfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693570975; x=1694175775; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fiK1vFAerqx62h3FROBtZBYwxxznsxxZMGhYfeBx1VE=; b=cNF4FSEZaAFUfIpaWrwSaPXxbEYZYABgchlQQT++iOOL0QNkMNdZZ38ebRZfMLcr7v vqvE9vJqg+uyW+yYAWC0ubg88l5oBJmx9eP+Yrb4tSquWthamis07Ksu2cWbTW3uLhCA JXZAkH7crXa9f/Ev4oIPvCZSKxSkxqx9VdzMb26jw96Xx0mMHjA8U8gPUxPwFDEQNOMS SPFAjO4rRRFrP6JA4JC83S9lWvocn7Omu2IsJVvPFEpzY6ngMWiQEhLf2ruKgOmyFfqV 8cM6n6OGwsEjJ9245lMrO1EhLCWFeCdNFk5SY3aWMgxu9vviiO0AtV0JhTmIQCh5QEdC b3Ww== X-Gm-Message-State: AOJu0Yx+VJ+VrlKOkJDxgCDgqRd7H8KH4yVkdKNzqTN+k42D+ZlgX4+9 XeUBpZyoTkJ45A76oZWD6Q6r2ALqUAZGI1SrgSAwUQ== X-Google-Smtp-Source: AGHT+IGwG0/oKkvTfovRSYu+AiK4UVXSIaG1Qw+GHs3jhkMFSC4s4wY8VwV1oPklmM4iYab7VPAJ8g== X-Received: by 2002:a05:6870:4205:b0:1ba:d044:8a4 with SMTP id u5-20020a056870420500b001bad04408a4mr2575194oac.18.1693570975100; Fri, 01 Sep 2023 05:22:55 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:578c:2809:35ff:14c6:cc12? ([2804:1b3:a7c3:578c:2809:35ff:14c6:cc12]) by smtp.gmail.com with ESMTPSA id zf19-20020a0568716a9300b001cc970f3b00sm2061087oab.50.2023.09.01.05.22.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 05:22:54 -0700 (PDT) Message-ID: Date: Fri, 1 Sep 2023 09:22:50 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v2] linux: Make fdopendir fail with O_PATH (BZ 30373) Content-Language: en-US To: Paul Eggert , libc-alpha@sourceware.org References: <20230810135411.1000205-1-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 31/08/23 17:21, Paul Eggert wrote: > On 2023-08-10 06:54, Adhemerval Zanella via Libc-alpha wrote: >> +  /* Fail early for descriptors opened with O_PATH.  */ >> +  if (__glibc_unlikely ((flags & O_PATH) == O_PATH)) >> +    { >> +      __set_errno (EBADF); >> +      return NULL; >> +    } > > Shouldn't this be (flags & O_PATH), not ((flags & O_PATH) == O_PATH)? The latter suggests more complexity than there really is. Indeed, I will send an updated version.