summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 79027c3)
raw | patch | inline | side by side (parent: 79027c3)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 6 Mar 2011 08:34:22 +0000 (09:34 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 6 Mar 2011 08:34:22 +0000 (09:34 +0100) |
src/Makefile.am | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index bc35a787ae5b1006c21aeb782ce7d24f55843e63..29e7d92122010a7bba401b8cb8b24d289e24da6e 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
noping_LDADD += -lrt
endif
endif # BUILD_WITH_LIBNCURSES
+
+install-exec-hook:
+ @if test "x0" = "x$$UID"; then \
+ if test "xLinux" = "x`uname -s`"; then \
+ echo "Setting CAP_NET_RAW capability on binaries."; \
+ setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping; \
+ setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping; \
+ else \
+ echo "Setting set-UID bit on binaries."; \
+ chmod u+s $(DESTDIR)$(bindir)/oping; \
+ chmod u+s $(DESTDIR)$(bindir)/noping; \
+ fi; \
+ fi