]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
autotools: add --disable-makeinstall-tty-setgid
authorKarel Zak <kzak@redhat.com>
Fri, 15 Nov 2024 10:30:17 +0000 (11:30 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 15 Nov 2024 10:30:17 +0000 (11:30 +0100)
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 <kzak@redhat.com>
configure.ac
term-utils/Makemodule.am

index e02a2026d6a2a38a24031c3f8e2e8b9d20f8d1e5..cac5475415a177ed98c7a24efaca211aca5803c5 100644 (file)
@@ -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]
index 1efe1c57e3710005fc275065752f6ead0e87cee6..a0ebd077ef6dd1996ff884d0c255c03cbdfa924a 100644 (file)
@@ -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