Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 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 |
| 5 | |
| 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 |
| 8 | the binaries. |
| 9 | |
| 10 | Upstream-Status: Inappropriate [Embedded] |
| 11 | Signed-off-by: Saul Wold <sgw@linux.intel.com> |
| 12 | --- |
| 13 | stapbpf/Makefile.am | 14 +++++++------- |
| 14 | staprun/Makefile.am | 12 ++++++------ |
| 15 | 2 files changed, 13 insertions(+), 13 deletions(-) |
| 16 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | Index: git/stapbpf/Makefile.am |
| 18 | =================================================================== |
| 19 | --- git.orig/stapbpf/Makefile.am |
| 20 | +++ git/stapbpf/Makefile.am |
| 21 | @@ -41,10 +41,10 @@ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 22 | |
| 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. |
| 25 | -install-exec-hook: |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | - if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \ |
| 27 | - || groupadd -f -g 156 -r stapusr); then \ |
| 28 | - chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | - && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \ |
| 30 | - fi |
| 31 | +#install-exec-hook: |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 32 | +## if [ `id -u` -eq 0 ] && (getent group stapusr >/dev/null \ |
| 33 | +## || groupadd -f -g 156 -r stapusr); then \ |
| 34 | +## chgrp stapusr "$(DESTDIR)$(bindir)/stapbpf" \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 35 | +# && chmod 04110 "$(DESTDIR)$(bindir)/stapbpf"; \ |
| 36 | +# fi |
| 37 | endif |