diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-23 13:19:46 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-23 16:55:07 -0700 |
commit | b914693a33ffcf0764ea9bc87bcc573e5ddf9943 (patch) | |
tree | a5f1451810cf940d03aa33d0761aa82b050e819e /src/property/ssh.lisp | |
parent | e4bda1ac845991cb79e6f3ad21db1d54ee36ddd2 (diff) | |
download | consfigurator-b914693a33ffcf0764ea9bc87bcc573e5ddf9943.tar.gz |
convert CONNECTION slots to connattrs & fix finding homedirs
HOME does not take into account /etc/passwd inside the chroot, even when
starting a login shell with, e.g., "chroot /chroot sh -lc 'echo $HOME'" -- we
would need something which emulates login(1), like su(1), but the -c argument
to su(1) is not portable. getent(1) is not POSIX. So use tilde expansion.
Additionally, avoid having UPLOAD-ALL-PREREQUISITE-DATA store values for the
remote UID, remote homedir etc. from *before* the chroot/setuid operation.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/ssh.lisp')
-rw-r--r-- | src/property/ssh.lisp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property/ssh.lisp b/src/property/ssh.lisp index 08b7b32..15169cd 100644 --- a/src/property/ssh.lisp +++ b/src/property/ssh.lisp @@ -21,7 +21,7 @@ (defprop authorized-keys :posix (&rest keys) "Permits using KEYS to SSH in as the current user." (:desc (declare (ignore keys)) - (strcat (get-user) " has authorized_keys")) + (strcat (get-connattr :remote-user) " has authorized_keys")) (:apply (file:directory-exists ".ssh") (apply #'file:contains-lines ".ssh/authorized_keys" keys)) |