[openssh-commits] [openssh] 02/05: sync ssh-copy-id to upstream version 527be673f4d
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Oct 6 13:26:42 AEDT 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch V_10_1
in repository openssh.
commit 2fd0945913a30fbbe7c02503347961df03f28e66
Author: Damien Miller <djm at mindrot.org>
AuthorDate: Mon Oct 6 12:48:16 2025 +1100
sync ssh-copy-id to upstream version 527be673f4d
---
contrib/ssh-copy-id | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index dcf579843..afb9beca4 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -1,12 +1,14 @@
#!/bin/sh
-# Copyright (c) 1999-2024 Philip Hands <phil at hands.com>
+# Copyright (c) 1999-2025 Philip Hands <phil at hands.com>
+# 2025 Denis Ovsienko <denis at ovsienko.info>
+# 2024 Frank Fischer <f.fischer at freifunk-nordhessen.de>
# 2021 Carlos Rodríguez Gili <carlos.rodriguez-gili at upc.edu>
# 2020 Matthias Blümel <blaimi at blaimi.de>
# 2017 Sebastien Boyron <seb at boyron.eu>
# 2013 Martin Kletzander <mkletzan at redhat.com>
# 2010 Adeodato =?iso-8859-1?Q?Sim=F3?= <asp16 at alu.ua.es>
-# 2010 Eric Moret <eric.moret at gmail.com>
+# 2010 Eric Moret
# 2009 Xr <xr at i-jeuxvideo.com>
# 2007 Justin Pryzby <justinpryzby at users.sourceforge.net>
# 2004 Reini Urban <rurban at x-ray.at>
@@ -284,14 +286,17 @@ installkeys_sh() {
# the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
# the cat adds the keys we're getting via STDIN
# and if available restorecon is used to restore the SELinux context
- # OpenWrt has a special case for root only.
- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
+ # OpenWrt has a special case for root/UID:0. Haiku is also special.
+ INSTALLKEYS_SH=$(tr -s '\t\n' ' ' <<-EOF
$SET_X
cd;
umask 077;
AUTH_KEY_FILE="${TARGET_PATH}";
- [ -f /etc/openwrt_release ] && [ "\$LOGNAME" = "root" ] &&
+ [ -f /etc/openwrt_release ] &&
+ { [ "\$LOGNAME" = "root" ] || [ "\$(id -u)" = "0" ]; } &&
AUTH_KEY_FILE=/etc/dropbear/authorized_keys;
+ [ "\`uname -s\`" = "Haiku" ] &&
+ AUTH_KEY_FILE=config/settings/ssh/authorized_keys;
AUTH_KEY_DIR=\`dirname "\${AUTH_KEY_FILE}"\`;
mkdir -p "\${AUTH_KEY_DIR}" &&
{ [ -z "\`tail -1c "\${AUTH_KEY_FILE}" 2>/dev/null\`" ] ||
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list