summaryrefslogtreecommitdiff
path: root/make-linux.mk
diff options
context:
space:
mode:
authorMichał Zieliński <michal@zielinscy.org.pl>2016-10-16 13:35:29 +0200
committerMichał Zieliński <michal@zielinscy.org.pl>2016-10-16 13:53:44 +0200
commit344a25c133ab8195d8b16bb922c951ca6d604057 (patch)
tree36cc0e148f41111ddc805cb62e468719392b6f5f /make-linux.mk
parent88e3fe699c685f74d3cc568a50967859fa15db5b (diff)
downloadinfinitytier-344a25c133ab8195d8b16bb922c951ca6d604057.tar.gz
infinitytier-344a25c133ab8195d8b16bb922c951ca6d604057.zip
Run as nonroot user on Linux (with CAP_NET_ADMIN and CAP_NET_RAW added).
- ZT will only drop root privileges if zerotier-one user exists. It is created by Debian postinst script - in other cases the user has to be created by administrator. - Linux >=4.3 with ambient capabilities is required, otherwise ZT will silently - "-U" option now also disables privileges dropping
Diffstat (limited to 'make-linux.mk')
-rw-r--r--make-linux.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/make-linux.mk b/make-linux.mk
index 016f7b7c..9dfd39bf 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -111,8 +111,8 @@ endif
all: one manpages
-one: $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o $(LDLIBS)
+one: $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o osdep/LinuxDropPrivileges.o
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o osdep/LinuxDropPrivileges.o $(LDLIBS)
$(STRIP) zerotier-one
ln -sf zerotier-one zerotier-idtool
ln -sf zerotier-one zerotier-cli