From: "Ludovic Courtès" <ludo@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 44623@debbugs.gnu.org
Subject: [bug#44623] [PATCH] archive: Warn about replacing an ACL symlink.
Date: Sun, 15 Nov 2020 21:50:33 +0100 [thread overview]
Message-ID: <871rgu73ae.fsf@gnu.org> (raw)
In-Reply-To: <20201113202041.2447-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Fri, 13 Nov 2020 21:20:41 +0100")
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> * guix/scripts/archive.scm (authorize-key): Warn when %ACL-FILE is a
> symbolic link and print an additional hint for Guix System users.
Oh, I was convinced that ‘guix archive --authorize’ would now fail on
Guix System, but indeed it doesn’t, due to the canonical rename trick.
> + ;; Warn about potentially volatile ACLs, but continue: system reconfiguration
> + ;; might not be possible without (newly-authorized) substitutes.
> + (when (and (access? %acl-file F_OK)
> + (eq? 'symlink (stat:type (lstat %acl-file))))
You can do both at once (thus avoiding a TOCTTOU race) with:
(let ((stat (false-if-exception (lstat %acl-file))))
(when (and stat …)
…))
Otherwise LGTM (for ‘master’), thanks!
Ludo’.
next prev parent reply other threads:[~2020-11-15 20:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 20:20 [bug#44623] [PATCH] archive: Warn about replacing an ACL symlink Tobias Geerinckx-Rice via Guix-patches via
2020-11-15 20:50 ` Ludovic Courtès [this message]
2020-11-15 22:06 ` bug#44623: " Tobias Geerinckx-Rice via Guix-patches via
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rgu73ae.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=44623@debbugs.gnu.org \
--cc=me@tobias.gr \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.