From 07de6670ed3c8ee4c2a223272727f152a1a716ab Mon Sep 17 00:00:00 2001 From: "Artem S. Tashkinov" Date: Thu, 22 Apr 2010 10:18:46 +0400 Subject: [PATCH] Ticket #2050: extfs/urar: disable user/system configuration for list and copyout operations. My system wide .rarrc contains these switches switches= -m5 -mdG -r -s -t -ol -tl So whenever you list the contents of any archive or copy a file out of it, RAR/UNRAR will traverse *all* sub directories (note -r, recursive switch) in a current directory trying to find *all* archives with the same name. So, the net result might be that unrar/rar will extract the wrong file and spend a lot of time trying to find archives with the same name. That's why I strongly suggest disabling user/system configuration for archive list and copyout operations (note the added -cfg switch). I have contacted Eugene Roshal and he said that he won't disable -r switch for extract and archive list operations, so, we can only fix this problem on our side. Signed-off-by: Andrew Borodin --- lib/vfs/mc-vfs/extfs/urar.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vfs/mc-vfs/extfs/urar.in b/lib/vfs/mc-vfs/extfs/urar.in index 91f958386..2fe342adc 100644 --- a/lib/vfs/mc-vfs/extfs/urar.in +++ b/lib/vfs/mc-vfs/extfs/urar.in @@ -28,7 +28,7 @@ fi mcrarfs_list () { - $UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` ' + $UNRAR v -c- -cfg- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` ' BEGIN { flag=0 } /^-------/ { flag++; if (flag > 1) exit 0; next } flag==1 { @@ -65,7 +65,7 @@ mcrarfs_copyin () mcrarfs_copyout () { - $UNRAR p -p- -c- -inul "$1" "$2" > "$3" + $UNRAR p -p- -c- -cfg- -inul "$1" "$2" > "$3" } mcrarfs_mkdir ()