Blob Blame History Raw
From 26461a88508f277c33d95f5c5eb52cdd8d7c7737 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 29 Aug 2013 15:54:19 +0200
Subject: [PATCH 6/6] icecc-create-env: avoid tar looking at /etc/passwd

If we invoke tar with --numeric-owner, it won't try to read /etc/passwd.
This has the minor benefit of not having to worry about this access in
the SELinux policy.
---
 client/icecc-create-env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/icecc-create-env b/client/icecc-create-env
index 029e351..1379ce1 100755
--- a/client/icecc-create-env
+++ b/client/icecc-create-env
@@ -337,7 +337,7 @@ md5=`for i in $target_files; do $md5sum $tempdir/$i; done | sed -e 's/ .*$//' |
 echo "creating $md5.tar.gz"
 mydir=`pwd`
 cd $tempdir
-tar -czhf "$mydir/$md5".tar.gz $target_files || {
+tar -czh --numeric-owner -f "$mydir/$md5".tar.gz $target_files || {
   echo "Couldn't create archive"
   exit 3
 }
-- 
1.8.3.1