Thread (11 messages) 11 messages, 4 authors, 2016-06-15

[PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

flat view
DORMANTno replies

From: Michael J Gruber <hidden>
Date: 2016-06-15 23:03:10
Subsystem: the rest · Maintainer: Linus Torvalds

Before gnupg 2.1 (aka "modern branch"), gpghome would contain only files
which allowed t/lib-gpg.sh to set permissions explicitely, and we did
that since
28a1b07 (t/lib-gpg: adjust permissions for gnupg 2.1, 2014-12-02)
in order to adjust wrong permissions from a checkout on ro file systems.

gnupg 2.1 creates a new directory in gpghome which would get its x bit removed.

Adjust and use +X so that any directory would get its x bit set. This
also keeps the x bit on files which had it set for whatever wrong
reason, but we care only about having at least the necessary
permissions for the tests to run.

Signed-off-by: Michael J Gruber <redacted>
---
Something like this?
Untested for lack of gpg2.1

 t/lib-gpg.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index cd2baef..25ca12d 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -17,8 +17,7 @@ else
 		# Name and email: C O Mitter <committer@example.com>
 		# No password given, to enable non-interactive operation.
 		cp -R "$TEST_DIRECTORY"/lib-gpg ./gpghome
-		chmod 0700 gpghome
-		chmod 0600 gpghome/*
+		chmod -R u+rwX gpghome
 		GNUPGHOME="$(pwd)/gpghome"
 		export GNUPGHOME
 		test_set_prereq GPG
-- 
2.2.0.rc3.286.g888a711
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help