summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraristocratos <admin@qvantnet.com>2021-10-13 23:20:15 +0200
committeraristocratos <admin@qvantnet.com>2021-10-13 23:20:15 +0200
commit921cfa01ffc104c57f2825d0bca648233ddff191 (patch)
treeeb2806a07afc844b9ff46102f4ed3713c8c33ffc
parenta416c888c7356634ef7a5286130a56160d72f50a (diff)
Re-enable setuid and set default SU_GROUP to wheel for OSX
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5dc459b..db4bbfe 100644
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,6 @@ override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
INC := -I$(INCDIR) -I$(SRCDIR)
SU_USER := root
-SU_GROUP := root
ifdef DEBUG
override OPTFLAGS := -O0 -g
@@ -106,7 +105,9 @@ endif
ifeq ($(PLATFORM), OSX)
override LDCXXFLAGS += -framework IOKit -framework CoreFoundation
+ SU_GROUP := wheel
else
+ SU_GROUP := root
ifneq ($(ARCH),arm64)
override LDCXXFLAGS += -fstack-protector -fstack-clash-protection
endif
@@ -179,7 +180,7 @@ install:
@printf "\033[1;92mInstalling themes to: \033[1;97m$(DESTDIR)$(PREFIX)/share/btop/themes\033[0m\n"
@cp -pr themes $(DESTDIR)$(PREFIX)/share/btop
-ifneq ($(PLATFORM),OSX)
+
#? Set SUID bit for btop as $SU_USER in $SU_GROUP
setuid:
@printf "\033[1;97mFile: $(DESTDIR)$(PREFIX)/bin/btop\n"
@@ -187,7 +188,6 @@ setuid:
@chown $(SU_USER):$(SU_GROUP) $(DESTDIR)$(PREFIX)/bin/btop
@printf "\033[1;92mSetting SUID bit\033[0m\n"
@chmod u+s $(DESTDIR)$(PREFIX)/bin/btop
-endif
uninstall:
@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/bin/btop\033[0m\n"