FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 04-08-2012, 11:32 PM
Allan McRae
 
Default pacman-key: avoid use of tempfile in verify_sig

On 09/04/12 04:13, Dave Reisner wrote:
> Use --status-fd rather than --status-file to keep this contained in a
> pipeline.
>
> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
> ---
> scripts/pacman-key.sh.in | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
> index 1a2bac3..87d7658 100644
> --- a/scripts/pacman-key.sh.in
> +++ b/scripts/pacman-key.sh.in
> @@ -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"

I remember during adding signature verification to pacman that we had to
use the status file to avoid some issue... But what exactly that issue
was I can not remember.

> exit 1
> fi
> - rm -f "${fd}"
> }
>
> updatedb() {
 

Thread Tools




All times are GMT. The time now is 04:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org