GNU bug report logs - #70714
realpath no error for unreadable-symlink

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Nineteendo INC <nineteendo19d0@HIDDEN>; dated Thu, 2 May 2024 12:46:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 70714 <at> debbugs.gnu.org:


Received: (at 70714) by debbugs.gnu.org; 2 May 2024 13:44:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 09:44:58 2024
Received: from localhost ([127.0.0.1]:43908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2Wk4-0003Oi-6H
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 09:44:58 -0400
Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:47157)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pixelbeat@HIDDEN>) id 1s2Wk0-0003Oc-OF
 for 70714 <at> debbugs.gnu.org; Thu, 02 May 2024 09:44:55 -0400
Received: by mail-wr1-x42d.google.com with SMTP id
 ffacd0b85a97d-34d8d11a523so1597966f8f.2
 for <70714 <at> debbugs.gnu.org>; Thu, 02 May 2024 06:44:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714657465; x=1715262265; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:to:subject:user-agent:mime-version:date:message-id
 :sender:from:to:cc:subject:date:message-id:reply-to;
 bh=kE8tSFY7RO8WT2GOQ/Zerai8fEALEH0Lq6C15PVXz/c=;
 b=IxSFVEr9QFzy6peG7BSV0/xqD+qkABEzAXGafKou5pjSq0wkzNU30Q0VYXxKuRAfrI
 yHeXtALeT5nICo6AsS0pxQelRl5jFknLRfCpggNPzQYNKcH78mb9Ro5tT3A2ZkjR2eLr
 15mDArda5+buewv4jrmCITNqVKzeOhDuD+0uIJd1TiCnuWW8OGFX66NkCQTAJs04R/dk
 oF7KyHIvqlmV3RZIU/OkmXIZKN7cvzez3oH2TWNGN+VQ3IsgsAcNUwWWeDfmgOwq466M
 3OVOxIs410QPqusSgUlF/YiTZKScCSkwC/1vqn5wQRT/h3DC4Ejy+GzkxuzBUJdf4xfe
 Tb1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714657465; x=1715262265;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:to:subject:user-agent:mime-version:date:message-id
 :sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=kE8tSFY7RO8WT2GOQ/Zerai8fEALEH0Lq6C15PVXz/c=;
 b=hEUnP566LrilAVCw/17a/RQaXtu14hIA21XCR9hqBM9bcZkZCR89da1XRpyEu1L8Cv
 cvvDqT5vUbE2OWZ//EoAKd/PYXkK4qpgfeNo5nAv79Llz+qoYnRn7h3aAEkY7OFY+3an
 G0vcyns9oL5CbA3XNV3riBs8qDEHorwH/t8Hci8Q1lLFWpAUH2G8/vmdD/NR1d2bHjYu
 dqCVtjMK67LV8174+kILRXGCxfgDx7jSAGWKrF+BSFQewaH02v7aap7kq30NyRh72TeE
 sK+0Za9K8P8f+rcJiKLSAJbqUPobcocr0/WYokF1adgSmL0IQk+dYb3E25IG8zdnPLye
 q4sw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWBvrvUX4uRdlnlMhhdyf3qby+NhdFq6VOG28ICp7Mykgs2uoASCDuKo1QIUUJJ/yS5l2CoaA0DjhokspB5Aex/mFNPwZs=
X-Gm-Message-State: AOJu0YyFi18Vl13yFGqnqm5l/nYxxkzUtKYF5oIs+w5ni1MDvmngYHme
 N7eAJvortt+sDU90KE7Ot7W9ZtQZLiY1V+GThgSsa+GXP9Ek+xcc
X-Google-Smtp-Source: AGHT+IHfnPNf73DPIWT9TGNh+DE+zmx0oXFkTWVohaoN4hqRCupa5lz9Mf5XOQaZsdUaW3dXXYmruA==
X-Received: by 2002:a5d:6988:0:b0:34d:afbb:38b7 with SMTP id
 g8-20020a5d6988000000b0034dafbb38b7mr4101085wru.20.1714657464704; 
 Thu, 02 May 2024 06:44:24 -0700 (PDT)
Received: from [192.168.1.59]
 (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146])
 by smtp.googlemail.com with ESMTPSA id
 d1-20020adfa341000000b0034c124b80f7sm1316298wrb.61.2024.05.02.06.44.23
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 02 May 2024 06:44:24 -0700 (PDT)
Message-ID: <7f7a765d-08e0-4d58-9b62-db17298acaf4@HIDDEN>
Date: Thu, 2 May 2024 14:44:18 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
Subject: Re: bug#70714: realpath no error for unreadable-symlink
To: Nineteendo INC <nineteendo19d0@HIDDEN>, 70714 <at> debbugs.gnu.org
References: <5F0F3A02-ADEB-438D-B5A3-F3344F2C7BDB@HIDDEN>
Content-Language: en-US
From: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
In-Reply-To: <5F0F3A02-ADEB-438D-B5A3-F3344F2C7BDB@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 70714
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 02/05/2024 07:16, Nineteendo INC wrote:
> coreutils version: stable 9.5 (bottled)
> OS version: macOS 13.6.6 (22G630)
> 
> `realpath` doesn’t behave correctly for unreadable symlinks:
> 
> wannes@Stefans-iMac ~ % ln -s . src
> wannes@Stefans-iMac ~ % grealpath -e src/..
> /Users
> wannes@Stefans-iMac ~ % chmod -h 000 src
> wannes@Stefans-iMac ~ % grealpath -e src/..
> /Users/wannes
> 
> Expected behaviour:
> 
> wannes@Stefans-iMac ~ % grealpath -e src/..
> grealpath: src/..: Permission denied

Right, looks like we'll have to cater for EACCES on darwin.
I'll have a look




Information forwarded to bug-coreutils@HIDDEN:
bug#70714; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 May 2024 12:45:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 08:45:18 2024
Received: from localhost ([127.0.0.1]:43553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2VoM-0003eR-FT
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 08:45:18 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60780)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <nineteendo19d0@HIDDEN>) id 1s2Pkk-0004Bs-7V
 for submit <at> debbugs.gnu.org; Thu, 02 May 2024 02:17:10 -0400
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 <nineteendo19d0@HIDDEN>)
 id 1s2PkH-0001e2-L1
 for bug-coreutils@HIDDEN; Thu, 02 May 2024 02:16:41 -0400
Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <nineteendo19d0@HIDDEN>)
 id 1s2PkG-0008T0-2e
 for bug-coreutils@HIDDEN; Thu, 02 May 2024 02:16:41 -0400
Received: by mail-ej1-x62d.google.com with SMTP id
 a640c23a62f3a-a58fbbcd77aso505973866b.2
 for <bug-coreutils@HIDDEN>; Wed, 01 May 2024 23:16:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714630596; x=1715235396; darn=gnu.org;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=P/5DYlToMXgHIukgpoFjfd3s424SeomaVwM3syRABrQ=;
 b=nHFN9ZVrDqjZwfUlq7sw8W1Dyj8LkTndVzhoHLSfv+EH4R8ObwcrnHLoX76s47PDTH
 ABqEASAOm9srv5kSl2CtA/BJhM9LFkGNcW1s8j7eby0C6eM0CKQkc66zD6faNOtI3uGt
 bvEhmDHKgGX5jRA1D/87dNXJ6DVjBvduYvJe6hh9RBZ+sAgZXouwY2zfXneaSKPSSH0C
 0f1stpp2Tt/JNdKf+vpUnpszVGrTGo27cbdPTqZx0SADN+Ynl6vOObWxRsQE1Ti5k7cx
 BcIJU7uEOTKuNaBVTATXSRa4KOpNcCajMxzNNgJy6pmUaFDN3YMYIt+bJPiKGmOq+L0D
 UAbg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714630596; x=1715235396;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=P/5DYlToMXgHIukgpoFjfd3s424SeomaVwM3syRABrQ=;
 b=mx++F9d8hvB2LyZmPOMloS7Ejt9FkebMPaRsJu5Qnq1QrQGubGpEJAgK7rvwU2JEu5
 19cwSIRs4moi4PlosCpc6UDjxP/+BnnbwSvXGRIvbczxRRbLRGME+887wgbwiZkoBFdO
 XFYnBcXYEfCUTIZW80oQqMNLmQi4Xhp9ka7z36GeAdungKQsdZ7xwznC1bt2IeNH5Tp9
 ctV2gu0VTZLBMqwea76T7Jj7ZaJxLqL6FlxP8BW/wSDPhMwcGRV3HwpbB4H5lYtnBsbm
 rTj+yW4xU88Vd7B3GaKCJeiXIPlFfX6NC7d49LuDA2O151ojGEMGw/23Tnj60EdDSv9W
 C4Zw==
X-Gm-Message-State: AOJu0YxGaRq+f28miRA5/QBXbOBCak1j/5YhjAKhQiWTtbyAukFDug8E
 Zfk7ewdFLPrXL+WBe4lFFXdB2wFFjQ7KFNt3RTxD4Amhzo9SdesECq/puw==
X-Google-Smtp-Source: AGHT+IFdFkbu3YjoJjshRQ7tD2yTKx8WXHfOVdolCrqLaWaD1CdEIJnMg5vHEvMeVwmdGFCqaoDlDQ==
X-Received: by 2002:a17:906:395:b0:a58:ca91:7855 with SMTP id
 b21-20020a170906039500b00a58ca917855mr2896511eja.0.1714630596098; 
 Wed, 01 May 2024 23:16:36 -0700 (PDT)
Received: from smtpclient.apple ([2a02:a03f:8a9f:7500:919e:78e7:2f5f:fe90])
 by smtp.gmail.com with ESMTPSA id
 q11-20020a1709066acb00b00a57c75871d8sm152198ejs.106.2024.05.01.23.16.35
 for <bug-coreutils@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 01 May 2024 23:16:35 -0700 (PDT)
From: Nineteendo INC <nineteendo19d0@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: realpath no error for unreadable-symlink
Message-Id: <5F0F3A02-ADEB-438D-B5A3-F3344F2C7BDB@HIDDEN>
Date: Thu, 2 May 2024 08:16:26 +0200
To: bug-coreutils@HIDDEN
X-Mailer: Apple Mail (2.3731.700.6.1.1)
Received-SPF: pass client-ip=2a00:1450:4864:20::62d;
 envelope-from=nineteendo19d0@HIDDEN; helo=mail-ej1-x62d.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  coreutils version: stable 9.5 (bottled) OS version: macOS
   13.6.6 (22G630) `realpath` doesn’t behave correctly for unreadable symlinks:
    wannes@Stefans-iMac ~ % ln -s . src wannes@Stefans-iMac ~ % grealpath -e
   src/.. /Users wannes@Stefans-iMac ~ % chmod -h 000 src wannes@Stefans-iMac
    ~ % grealpath -e src/.. /Users/wannes 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (nineteendo19d0[at]gmail.com)
  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
                             in digit (nineteendo19d0[at]gmail.com)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 02 May 2024 08:45:14 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

coreutils version: stable 9.5 (bottled)
OS version: macOS 13.6.6 (22G630)

`realpath` doesn=E2=80=99t behave correctly for unreadable symlinks:

wannes@Stefans-iMac ~ % ln -s . src       =20
wannes@Stefans-iMac ~ % grealpath -e src/..
/Users
wannes@Stefans-iMac ~ % chmod -h 000 src
wannes@Stefans-iMac ~ % grealpath -e src/..
/Users/wannes

Expected behaviour:

wannes@Stefans-iMac ~ % grealpath -e src/..
grealpath: src/..: Permission denied





Acknowledgement sent to Nineteendo INC <nineteendo19d0@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#70714; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 2 May 2024 13:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.