1 From 3e13a006fe3dff9489269274093bf868532036e2 Mon Sep 17 00:00:00 2001
2 From: Saul Wold <sgw@linux.intel.com>
3 Date: Tue, 5 Sep 2017 16:02:55 -0700
4 Subject: [PATCH] staprun/stapbpf: don't support installing a non-root
6 Since we are in a known environment and installing as root and
7 expect to be running as root, don't create the group or chmod
10 Upstream-Status: Inappropriate [Embedded]
11 Signed-off-by: Saul Wold <sgw@linux.intel.com>
13 stapbpf/Makefile.am | 14 +++++++-------
14 staprun/Makefile.am | 12 ++++++------
15 2 files changed, 13 insertions(+), 13 deletions(-)
17 diff --git a/stapbpf/Makefile.am b/stapbpf/Makefile.am
18 index 421b044ef..f7daeb2b2 100644
19 --- a/stapbpf/Makefile.am
20 +++ b/stapbpf/Makefile.am
21 @@ -39,11 +39,11 @@ git_version.stamp ../git_version.h:
23 # Why the "id -u" condition? This way, an unprivileged user can run
24 # make install, and have "sudo stap ...." or "sudo stapbpf ...." work later.
26 - if [ `id -u` -eq 0 ]; then \
27 - getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
28 - getent group stapusr >/dev/null \
29 - && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
30 - && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
33 +# if [ `id -u` -eq 0 ]; then \
34 +# getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
35 +# getent group stapusr >/dev/null \
36 +# && chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \
37 +# && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \
40 diff --git a/staprun/Makefile.am b/staprun/Makefile.am
41 index 4073aa01c..2925e34c3 100644
42 --- a/staprun/Makefile.am
43 +++ b/staprun/Makefile.am
44 @@ -72,9 +72,9 @@ git_version.stamp ../git_version.h:
46 # Why the "id -u" condition? This way, an unprivileged user can run
47 # make install, and have "sudo stap ...." or "sudo staprun ...." work later.
49 - if [ `id -u` -eq 0 ]; then \
50 - getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
51 - getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \
52 - chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \
55 +# if [ `id -u` -eq 0 ]; then \
56 +# getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr; \
57 +# getent group stapusr >/dev/null && chgrp stapusr "$(DESTDIR)$(bindir)/staprun"; \
58 +# chmod 04110 "$(DESTDIR)$(bindir)/staprun"; \