From: Karel Zak Date: Fri, 15 Nov 2024 10:30:17 +0000 (+0100) Subject: autotools: add --disable-makeinstall-tty-setgid X-Git-Tag: v2.42-start~152^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a391c158af90667769ec3267ecd2490052c7aa2;p=thirdparty%2Futil-linux.git autotools: add --disable-makeinstall-tty-setgid If your distribution does not define permissions for installed binaries and follows the upstream guidelines, disabling the tty group's setgid could be a beneficial decision in certain situations. Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index e02a2026d..cac547541 100644 --- a/configure.ac +++ b/configure.ac @@ -2911,6 +2911,14 @@ AC_ARG_ENABLE([makeinstall-setuid], AM_CONDITIONAL([MAKEINSTALL_DO_SETUID], [test "x$enable_makeinstall_setuid" = xyes]) +AC_ARG_ENABLE([makeinstall-tty-setgid], + AS_HELP_STRING([--disable-makeinstall-tty-setgid], [do not setgid for wall, and write during "make install"]), + [], [enable_makeinstall_tty_setgid=yes] +) +AM_CONDITIONAL([MAKEINSTALL_DO_TTY_SETGID], [test "x$enable_makeinstall_tty_setgid" = xyes]) + + + AC_ARG_ENABLE([colors-default], AS_HELP_STRING([--disable-colors-default], [do not colorize output from utils by default]), [], [enable_colors_default=yes] diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am index 1efe1c57e..a0ebd077e 100644 --- a/term-utils/Makemodule.am +++ b/term-utils/Makemodule.am @@ -108,6 +108,7 @@ wall_CFLAGS += $(SYSTEMD_CFLAGS) endif if USE_TTY_GROUP if MAKEINSTALL_DO_CHOWN +if MAKEINSTALL_DO_TTY_SETGID install-exec-hook-wall:: chgrp tty $(DESTDIR)$(usrbin_execdir)/wall chmod g+s $(DESTDIR)$(usrbin_execdir)/wall @@ -115,6 +116,7 @@ install-exec-hook-wall:: INSTALL_EXEC_HOOKS += install-exec-hook-wall endif endif +endif endif # BUILD_WALL @@ -133,6 +135,7 @@ endif if USE_TTY_GROUP if MAKEINSTALL_DO_CHOWN +if MAKEINSTALL_DO_TTY_SETGID install-exec-hook-write:: chgrp tty $(DESTDIR)$(usrbin_execdir)/write chmod g+s $(DESTDIR)$(usrbin_execdir)/write @@ -140,4 +143,5 @@ install-exec-hook-write:: INSTALL_EXEC_HOOKS += install-exec-hook-write endif endif +endif endif # BUILD_WRITE