GNU bug report logs - #26155
Test brief-vs-stat-zero-kernel-lies fails if /proc/cmdline exists but is not readable

Previous Next

Package: diffutils;

Reported by: julama <at> fake-box.com

Date: Sat, 18 Mar 2017 15:52:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: julama <at> fake-box.com
Cc: 26155 <at> debbugs.gnu.org
Subject: bug#26155: Test brief-vs-stat-zero-kernel-lies fails if /proc/cmdline exists but is not readable
Date: Wed, 22 Mar 2017 21:43:16 -0700
[Message part 1 (text/plain, inline)]
On Sat, Mar 18, 2017 at 7:56 AM,  <julama <at> fake-box.com> wrote:
> Package: diffutils
> Version: 3.5
>
> The test tests/brief-vs-stat-zero-kernel-lies fails with
>
>     cat: /proc/cmdline: Permission denied
>
> if /proc/cmdline exists but is not readable. This is for example the case on
> a Linux kernel with grsecurity patchset and option GRKERNSEC_PROC_USER
> enabled.
>
> The fix is easy. The script tests/brief-vs-stat-zero-kernel-lies checks in
> line 13 only for exists (test -f) of $boot (= /proc/cmdline):
>
>     test -f $boot || skip_ no $boot file
>
> making it check for readability (test -r) solves the problem (as the test is
> now correctly skipped):
>
>     test -r $boot || skip_ file $boot not readable

Thank you for the report and fix.

I propose to push this commit in your name. Since all I have for your
"real name" is "julama", that's what I've used in the commit "author:"
header. If you'd prefer something else, or a different email address,
let me know.
[diff-vs-unreadable-proc-cmdline.diff (text/plain, attachment)]

This bug report was last modified 8 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.