summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2007-08-17 02:05:42 +0000
committerfche <fche>2007-08-17 02:05:42 +0000
commit7ab87febe805d86b81c393b13e8de69f2ab9b684 (patch)
treec2e530766599d632f74e1a5ffd7d8aa5623410b1
parent3cb170588c9b180fb4d28af04e44ac87481560a7 (diff)
downloadsystemtap-steved-7ab87febe805d86b81c393b13e8de69f2ab9b684.tar.gz
systemtap-steved-7ab87febe805d86b81c393b13e8de69f2ab9b684.tar.xz
systemtap-steved-7ab87febe805d86b81c393b13e8de69f2ab9b684.zip
2007-08-16 Frank Ch. Eigler <fche@elastic.org>
* Makefile.am (install-exec-hook): Only make staprun setuid if "make install" is being run as root. * Makefile.in: Regenerated.
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am6
-rw-r--r--Makefile.in4
3 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f2b5371..d50fe5d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-16 Frank Ch. Eigler <fche@elastic.org>
+
+ * Makefile.am (install-exec-hook): Only make staprun setuid if
+ "make install" is being run as root.
+ * Makefile.in: Regenerated.
+
2007-08-16 Josh Stone <joshua.i.stone@intel.com>
PR 4591
diff --git a/Makefile.am b/Makefile.am
index 9d50c6c8..4c5b2312 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,7 +68,11 @@ stapio_CFLAGS = @PROCFLAGS@ $(AM_CFLAGS)
stapio_LDADD = @PROCFLAGS@ -lpthread
install-exec-hook:
- chmod 04111 "$(DESTDIR)$(bindir)/staprun"
+ if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi
+
+# Why the "id -u" condition? This way, an unprivileged user can run
+# make install, and have "sudo stap ...." or "sudo staprun ...." work later.
+
pkglibexec_PROGRAMS = stapio
CLEANFILES += $(pkglibexec_PROGRAMS)
diff --git a/Makefile.in b/Makefile.in
index a203dcc5..e9837f60 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -67,7 +67,7 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
$(top_srcdir)/man/stapprobes.tcp.5.in \
$(top_srcdir)/man/stapprobes.udp.5.in AUTHORS COPYING \
ChangeLog INSTALL NEWS compile config.guess depcomp install-sh \
- missing
+ ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -1464,7 +1464,7 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
@BUILD_ELFUTILS_TRUE@install-exec-local: install-elfutils
install-exec-hook:
- chmod 04111 "$(DESTDIR)$(bindir)/staprun"
+ if [ `id -u` -eq 0 ]; then chmod 04111 "$(DESTDIR)$(bindir)/staprun"; fi
@BUILD_CRASHMOD_TRUE@$(STAPLOG): staplog.c
@BUILD_CRASHMOD_TRUE@ $(CC) -shared -rdynamic $(LDFLAGS) $(CFLAGS) -fPIC -o $@ $<