PR28240: debuginfod client root-safe negative caching
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 18 Aug 2021 22:29:34 +0000 (18:29 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 22 Oct 2021 15:41:47 +0000 (11:41 -0400)
commit7d64173fb11c66284a408e52d41d15b7755d65d2
treebb9065916c93096c6d49e8e839112db259967410
parente3e70782a1d1a246844215991bbd2d6b60d0aa41
PR28240: debuginfod client root-safe negative caching

Negative cache (000-permission) files were incorrectly treated as
valid cached files for the root user, because root can open even
000-perm files without -EACCES.  Corrected this checking sequence.

Fixed the debuginfod testsuite to run to completion as root or
as an ordinary user, correcting corresponding permission checks:
    stat -c %A $FILE
is right and
    [ -w $FILE]  [ -r $FILE ]
were wrong.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c
tests/ChangeLog
tests/run-debuginfod-000-permission.sh
tests/run-debuginfod-artifact-running.sh
tests/run-debuginfod-writable.sh