From: dtucker Date: Thu, 13 Jan 2022 04:22:10 +0000 (+0000) Subject: Avoid %'s in commands (not used in OpenBSD, but used in -portable's X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=57edf436dcc1f1fa735f7509bae89a2383ebda30;p=openbsd Avoid %'s in commands (not used in OpenBSD, but used in -portable's Valgrind test) being interpretted as printf format strings. --- diff --git a/regress/usr.bin/ssh/agent-restrict.sh b/regress/usr.bin/ssh/agent-restrict.sh index bdd24ffb08e..cd8486e18d3 100644 --- a/regress/usr.bin/ssh/agent-restrict.sh +++ b/regress/usr.bin/ssh/agent-restrict.sh @@ -1,4 +1,4 @@ -# $OpenBSD: agent-restrict.sh,v 1.3 2022/01/12 07:18:37 dtucker Exp $ +# $OpenBSD: agent-restrict.sh,v 1.4 2022/01/13 04:22:10 dtucker Exp $ # Placed in the Public Domain. tid="agent restrictions" @@ -86,7 +86,7 @@ reset_keys() { trace "reset keys" >$OBJ/authorized_keys_$USER for h in e d c b a; do - (printf "restrict,agent-forwarding,command=\"$_command\" "; + (printf "%s" "restrict,agent-forwarding,command=\"$_command\" "; cat $OBJ/user_$h.pub) >> $OBJ/authorized_keys_$USER done }