From 597286eb258f841dfc00f65474138fc6192f0092 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 11 Apr 2013 09:18:47 -0400 Subject: paccache: avoid subshell in calling runcmd Avoids problems with one of the worst CLI tools ever created, su. Fixes FS#34656. Signed-off-by: Dave Reisner Signed-off-by: Allan McRae --- contrib/paccache.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in index c3312733..64c3c536 100644 --- a/contrib/paccache.sh.in +++ b/contrib/paccache.sh.in @@ -308,9 +308,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum } # crush. kill. destroy. (( verbose )) && cmdopts+=(-v) if (( delete )); then - printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}" + runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}" elif (( move )); then - printf '%s\0' "${candidates[@]}" | runcmd xargs -0 mv "${cmdopts[@]}" -t "$movedir" + runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") mv "${cmdopts[@]}" -t "$movedir" fi summarize "$pkgcount" "${candidates[@]}" -- cgit v1.2.3-70-g09d2