From patchwork Thu May 28 10:18:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1299644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49XkFH1nW2z9sSW for ; Thu, 28 May 2020 20:18:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 071FA3870869; Thu, 28 May 2020 10:18:56 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id D4FE1386F806 for ; Thu, 28 May 2020 10:18:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4FE1386F806 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 03C67488B; Thu, 28 May 2020 12:18:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MF_g-bEqAbVS; Thu, 28 May 2020 12:18:51 +0200 (CEST) Received: from function (lfbn-bor-1-797-11.w86-234.abo.wanadoo.fr [86.234.239.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id BD8833E0F; Thu, 28 May 2020 12:18:51 +0200 (CEST) Received: from samy by function with local (Exim 4.93) (envelope-from ) id 1jeFcg-004fh5-M8; Thu, 28 May 2020 12:18:50 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] hurd: Fix fdopendir checking for directory type Date: Thu, 28 May 2020 12:18:50 +0200 Message-Id: <20200528101850.1113542-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-15.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * sysdeps/mach/hurd/fdopendir.c (__fdopendir): Lookup "./" instead of "/" that would designate the root of the filesystem. --- sysdeps/mach/hurd/fdopendir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/fdopendir.c b/sysdeps/mach/hurd/fdopendir.c index f15801f141..0583cdca0f 100644 --- a/sysdeps/mach/hurd/fdopendir.c +++ b/sysdeps/mach/hurd/fdopendir.c @@ -39,7 +39,7 @@ __fdopendir (int fd) /* Ensure that it's a directory. */ error_t err = HURD_FD_PORT_USE (d, ({ - file_t dir = __file_name_lookup_under (port, "/", + file_t dir = __file_name_lookup_under (port, "./", O_DIRECTORY | O_NOTRANS, 0);; if (dir != MACH_PORT_NULL) __mach_port_deallocate (__mach_task_self (), dir);