From a067f676e708dda53c8b41f446817c568f90c410 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Tue, 17 Nov 2020 12:33:33 +0100 Subject: [PATCH] Remove setuid A new repository https://github.molgen.mpg.de/mariux64/setuid has been created for this tool so that it can be installed with bee. Remove it from this repository. --- Makefile | 10 ++++------ install.sh | 1 - setuid/setuid.c | 32 -------------------------------- 3 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 setuid/setuid.c diff --git a/Makefile b/Makefile index 8b55701..9810ebc 100644 --- a/Makefile +++ b/Makefile @@ -64,12 +64,10 @@ INSTALL=install -v INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) -m 644 -all: setuid/setuid +all: + @echo 'Nothing to be done. Ready for "make install"' -clean: - @rm setuid/setuid 2>/dev/null || true - -install: all +install: @prefix="$(prefix)" usr_prefix="$(usr_prefix)" usrlocal_prefix="$(usrlocal_prefix)" \ root_exec_prefix="$(root_exec_prefix)" root_bindir="$(root_bindir)" root_sbindir="$(root_sbindir)" \ usr_exec_prefix="$(usr_exec_prefix)" usr_bindir="$(usr_bindir)" usr_sbindir="$(usr_sbindir)" \ @@ -81,6 +79,6 @@ install: all DESTDIR="$(DESTDIR)" \ ./install.sh -.PHONY: all install clean +.PHONY: all install diff --git a/install.sh b/install.sh index 8632a44..5bc650b 100755 --- a/install.sh +++ b/install.sh @@ -147,7 +147,6 @@ install_data blink/blinkd.service "$DESTDIR$systemdunitdi install_data blink/51-blink.rules "$DESTDIR$udev_rulesdir/51-blink.rules" install_data clusterd/clusterd.service "$DESTDIR$systemdunitdir/clusterd.service" install_exec clusterd/clusterd "$DESTDIR$usr_sbindir/clusterd" -install_exec setuid/setuid "$DESTDIR$usr_sbindir/setuid" install_exec uvpn/uvpn "$DESTDIR$usr_bindir/uvpn" install_exec mxmount/mxmount "$DESTDIR$usr_bindir/mxmount" install_data mxmount/mxmount.service "$DESTDIR$systemdunitdir/mxmount.service" diff --git a/setuid/setuid.c b/setuid/setuid.c deleted file mode 100644 index 3480c9d..0000000 --- a/setuid/setuid.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include - -int main(int argc,char **argv) { - uid_t uid; - char *end; - int status; - - if (argc<3) { - fprintf(stderr,"usage: %s uid cmd...\n",argv[0]); - exit(1); - } - uid=strtoul(argv[1],&end,10); - if (end==argv[1] || *end != '\0') { - fprintf(stderr,"%s: %s: invalid uid\n",argv[0],argv[1]); - exit(1); - } - status=setuid(uid); - if (status==-1) { - perror(argv[0]); - exit(1); - } - - status=execvp(argv[2],&argv[2]); - if (status==-1) { - perror(argv[0]); - exit(1); - } - exit(0); -}