From: "Ludovic Courtès" <ludo@gnu.org>
To: 55661@debbugs.gnu.org
Subject: bug#55661: /etc/ssh/authorized_keys.d contains keys that have been removed
Date: Thu, 26 May 2022 17:02:00 +0200 [thread overview]
Message-ID: <875ylsfic7.fsf@inria.fr> (raw)
In the wake of <https://issues.guix.gnu.org/55359#3>, I realized that
/etc/ssh/authorized_keys.d is stateful: we copy files from the
authorized-key directory there, but files already present remain.
IOW, keys remain authorized.
Why are we copying that directory instead of making a symlink to the
directory computed by ‘authorized-key-directory’ that’s in /gnu/store?
This is explained in ‘openssh-activation’:
;; 'sshd' complains if the authorized-key directory and its parents
;; are group-writable, which rules out /gnu/store. Thus we copy the
;; authorized-key directory to /etc.
Anyway, that code does intend remove the directory before copying it,
but there’s a typo:
(delete-file-recursively "/etc/authorized_keys.d")
Can you spot it?
Ludo’.
next reply other threads:[~2022-05-26 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 15:02 Ludovic Courtès [this message]
2022-05-26 15:20 ` bug#55661: /etc/ssh/authorized_keys.d contains keys that have been removed Ludovic Courtès
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=875ylsfic7.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=55661@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.
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.