diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-10-01 23:58:05 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-10-02 01:00:12 +0200 |
commit | 8b32e72c6f7143de4ec02f44e362b0df9e21e024 (patch) | |
tree | c88cfc12b227728a5a72f5da099ad49e9a87bc02 /test/integration | |
parent | 9a61bb2176e6599094c575dec7184c3afd6f39bd (diff) |
ensure world-readability for trusted.gpg in postinst
apt-key creates trusted.gpg if it needs it with 644 nowadays, but before
it ensured this, it was gpg creating it, which gives it by default 600.
Not a problem as long as our gpgv is run as root, but now that we drop
privileges we have to ensure that we can also read trusted.gpg files
created by earlier apt-key versions.
Closes: 647001
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-apt-key | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key index d5adec5bd..e6ac530a6 100755 --- a/test/integration/test-apt-key +++ b/test/integration/test-apt-key @@ -41,7 +41,14 @@ gpg: unchanged: 1' aptkey --fakeroot update testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18' + testsuccess test ! -e rootdir/etc/apt/trusted.gpg testsuccess aptkey --fakeroot add ./keys/rexexpired.pub + msgtest 'Check if trusted.gpg is created with permissions set to' '0644' + if [ "$(stat -c '%a' rootdir/etc/apt/trusted.gpg )" = '644' ]; then + msgpass + else + msgfail + fi testaptkeys 'pub 2048R/27CE74F9 2013-07-12 [expired: 2013-07-13] pub 2048R/DBAC8DAE 2010-08-18' |