Skip to content

Commit c5a9f2d

Browse files
committed
Escape variables, ignore shift on normal call of sudo.
1 parent f550583 commit c5a9f2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

GoboALFS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,10 @@ if [ ! -d "$BUILDDIR/Programs/Sudo" ]
167167
then
168168
sudo tee "$BUILDDIR/bin/sudo" << EOF > /dev/null
169169
#!/bin/bash
170-
if [ "$1" = "-u" ]
170+
if [ "\$1" = "-u" ]
171171
then shift 2
172-
else shift 1
173172
fi
174-
exec "$@"
173+
exec "\$@"
175174
EOF
176175
sudo chmod +x "$BUILDDIR/bin/sudo"
177176
fi

0 commit comments

Comments
 (0)