1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
From: Gunnar Wolf <gwolf@debian.org>
Date: Sat, 3 Feb 2018 08:51:55 +0100
Subject: Report that root access is required
When perf_event_paranoid level is set to 3 (default), tiptop requires
root access to be run (#862461). Notify the user accordingly.
Origin: vendor https://bugs.debian.org/862461
Bug-Debian: https://bugs.debian.org/862461
Forwarded: no
Reviewed-By: Gunnar Wolf <gwolf@debian.orG>
Last-Update: 2017-10-31
---
src/requisite.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/requisite.c b/src/requisite.c
index c3adf0e..29efc77 100644
--- a/src/requisite.c
+++ b/src/requisite.c
@@ -69,8 +69,11 @@ int check()
else if (strcmp(os.release, "2.6.31") < 0) { /* lexicographic order */
fprintf(stderr, "Linux 2.6.31+ is required, OS reports '%s'.\n",
os.release);
- }
- else {
+ } else if (paranoia_level == 3) {
+ fprintf(stderr, "Your kernel is set with an event paranoia value of 3\n");
+ fprintf(stderr, "Either run this program as root, or set a lower\n");
+ fprintf(stderr, "paranoia value at '%s'.\n", PARANOID2);
+ } else {
fprintf(stderr, "Don't know why...\n");
}
exit(EXIT_FAILURE);
|