1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

pacman-key: avoid use of tempfile in verify_sig

Use --status-fd rather than --status-file to keep this contained in a
pipeline.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
Dave Reisner 2012-04-08 14:03:27 -04:00 committed by Dan McGee
parent f053141c87
commit ca090e10d2

View File

@ -439,14 +439,10 @@ refresh_keys() {
}
verify_sig() {
local fd="$(mktemp)"
"${GPG_PACMAN[@]}" --status-file "${fd}" --verify $SIGNATURE
if ! grep -qE 'TRUST_(FULLY|ULTIMATE)' "${fd}"; then
rm -f "${fd}"
if ! "${GPG_PACMAN[@]}" --status-fd 1 --verify $SIGNATURE | grep -qE 'TRUST_(FULLY|ULTIMATE)'; then
error "$(gettext "The signature identified by %s could not be verified.")" "$SIGNATURE"
exit 1
fi
rm -f "${fd}"
}
updatedb() {