makepkg: drop sudo permissions after use
Add the -k parameter to the sudo call to prevent caching of credientials. This would (potentailly) stop a rogue sudo use within a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
6d85d9ae08
commit
e1df19ee6f
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ run_pacman() {
|
||||||
cmd=("${PACMAN_AUTH[@]}" "${cmd[@]}")
|
cmd=("${PACMAN_AUTH[@]}" "${cmd[@]}")
|
||||||
fi
|
fi
|
||||||
elif type -p sudo >/dev/null; then
|
elif type -p sudo >/dev/null; then
|
||||||
cmd=(sudo "${cmd[@]}")
|
cmd=(sudo -k "${cmd[@]}")
|
||||||
else
|
else
|
||||||
cmd=(su root -c "$cmdescape")
|
cmd=(su root -c "$cmdescape")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue