unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: angry rectangle <angryrectangle@cock.li>
To: 55344@debbugs.gnu.org
Subject: bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission
Date: Tue, 17 May 2022 12:03:34 -0400	[thread overview]
Message-ID: <87czgcxhvs.fsf@cock.li> (raw)
In-Reply-To: 19f83bff-144b-f25a-db27-d8f48580897c@nixnet.email

(hmm... resending this because it didnt work. hopefully i'm doing it right this time.)

It looks like guile's compiler and optimizer could be replacing the `getuid' and `setuid' calls with constant, compile-time values.

Here is a test I performed:
1. Make directory with 770 owned by root and the `guixbuild' group. When guile is compiled with guix, I think the process is done under one of the guixbuilder<XX> users who have the `guixbuild' group.
2. Run guile under my regular user.
3. Try to `ftw' that directory. ftw detects it as a readable directory and then ends up throwing a "permission denied" error because it's not actually readable.

If I compile guile manually under my regular user and try ftw on a different user, I observe the results that support my conclusion.

System info:
Guile 3.0.8.13-cc455
guix on amd64





  reply	other threads:[~2022-05-17 16:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  0:25 bug#55344: ftw thinks readable directories are unreadable if "other" don't have read permission SeerLite via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2022-05-17 16:03 ` angry rectangle [this message]
2023-03-13  3:38 ` Saad Rhoulam
2023-10-13 10:38 ` bug#55344: getuid and getgid are indeed replaced with compile-time constants wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czgcxhvs.fsf@cock.li \
    --to=angryrectangle@cock.li \
    --cc=55344@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).