From fb5a4bff07c34012cc188ff5d8c3d174e9d8c131 Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 23 Oct 2019 20:24:46 +0000 Subject: first test commit to make sudo + sh scripts obsolete. install(1) is too unportable to handle this job so we take the content of the scripts. --- src/dns/Makefile.am | 7 ++++++- src/exit/Makefile.am | 3 ++- src/nat/Makefile.am | 12 +++++++++--- src/transport/Makefile.am | 6 ++++-- src/vpn/Makefile.am | 3 ++- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index acf9660f7..8082cbab5 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am @@ -25,7 +25,12 @@ endif if LINUX HIJACKBIN = gnunet-helper-dns install-exec-hook: - $(top_srcdir)/src/dns/install-dns-helper.sh $(DESTDIR)$(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_OR_DOAS_BINARY) || true + chown root $(DESTDIR)$(libexecdir)/gnunt-helper-dns + chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns + chmod 4750 $(DESTDIR)$(libexecdir)/gnunt-helper-dns + chgrp $(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns + chown gnunet:$(GNUNETDNS_GROUP) $(DESTDIR)$(libexecdir)/gnunt-helper-dns + chmod 2750 $(DESTDIR)$(libexecdir)/gnunt-helper-dns else install-exec-hook: endif diff --git a/src/exit/Makefile.am b/src/exit/Makefile.am index bca0f1d9f..c45354256 100644 --- a/src/exit/Makefile.am +++ b/src/exit/Makefile.am @@ -25,7 +25,8 @@ endif if LINUX EXITBIN = gnunet-helper-exit install-exec-hook: - $(top_srcdir)/src/exit/install-exit-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-exit + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-exit else install-exec-hook: endif diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index d88dd6db4..2c04741da 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am @@ -21,14 +21,20 @@ if LINUX NATSERVER = gnunet-helper-nat-server.c NATCLIENT = gnunet-helper-nat-client.c install-exec-hook: - $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client else if XFREEBSD NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client NATSERVER = gnunet-helper-nat-server.c NATCLIENT = gnunet-helper-nat-client.c install-exec-hook: - $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-server + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-nat-client endif else install-exec-hook: @@ -61,7 +67,7 @@ if USE_COVERAGE endif lib_LTLIBRARIES = \ - libgnunetnatnew.la + libgnunetnatnew.la libgnunetnatnew_la_SOURCES = \ nat_api.c \ diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 178ecc737..b690fa345 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -103,9 +103,11 @@ endif if LINUX install-exec-hook: - $(top_srcdir)/src/transport/install-wlan-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-wlan if HAVE_LIBBLUETOOTH - $(top_srcdir)/src/transport/install-bluetooth-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-transport-bluetooth endif else install-exec-hook: diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am index 4d7ca087e..9992fa5ed 100644 --- a/src/vpn/Makefile.am +++ b/src/vpn/Makefile.am @@ -25,7 +25,8 @@ endif if LINUX VPNBIN = gnunet-helper-vpn install-exec-hook: - $(top_srcdir)/src/vpn/install-vpn-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_OR_DOAS_BINARY) || true + chown root:root $(DESTDIR)$(libexecdir)/gnunet-helper-vpn + chmod u+s $(DESTDIR)$(libexecdir)/gnunet-helper-vpn else install-exec-hook: endif -- cgit v1.2.3