]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Use setcap instead of setuid when installing the binary. 114/head
authorAntonio Querubin <tony@lavanauts.org>
Tue, 3 May 2016 08:43:08 +0000 (22:43 -1000)
committerAntonio Querubin <tony@lavanauts.org>
Tue, 3 May 2016 08:43:08 +0000 (22:43 -1000)
Makefile.am

index ed06db868f6d61e6728244300a285ceda4cc4088..fa9a2ddb2221095ca2948d8ce0520cbd6ad197b1 100644 (file)
@@ -3,7 +3,8 @@ SUBDIRS = img
 sbin_PROGRAMS = mtr
 man_MANS = mtr.8
 install-exec-hook: 
-       chmod u+s $(DESTDIR)$(sbindir)/mtr
+       `setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr` \
+       || chmod u+s $(DESTDIR)$(sbindir)/mtr
 
 mtr_SOURCES = mtr.c \
               net.c net.h \