The patch allows to define special CFLAGS for typical suid programs
(like mount, umount, chfn, ...). Some distributions use for example
"-fpic" for suid binaries.
Signed-off-by: Karel Zak <kzak@redhat.com>
suffix = "devel" or "rc<N>"
+COMPILATION:
+
+ See the INSTALL file for more details.
+
+ Notes:
+ * use SUID_CFLAGS when you want to define special compiler options
+ for typical suid programs, for example:
+
+ SUID_CFLAGS="-fpic" ./configure
+
+ Now this feature is supported for chfn, chsh, newgrp, write,
+ mount and umount.
AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
fi
+
+AC_SUBST([SUID_CFLAGS])
+
CPPFLAGS="-fsigned-char -fomit-frame-pointer $CPPFLAGS"
LIBS=""
newgrp_LDADD =
vipw_LDADD =
+chfn_CFLAGS = $(SUID_CFLAGS)
+chsh_CFLAGS = $(SUID_CFLAGS)
+newgrp_CFLAGS = $(SUID_CFLAGS)
+
if NEED_LIBCRYPT
chfn_LDADD += -lcrypt
chsh_LDADD += -lcrypt
usrbinexec_PROGRAMS += write
man_MANS += write.1
+write_CFLAGS = $(SUID_CFLAGS)
if USE_TTY_GROUP
install-exec-hook::
$(MNTHDRS)
mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a
+mount_CFLAGS = $(SUID_CFLAGS)
umount_SOURCES = umount.c fstab.c sundries.c xmalloc.c realpath.c mount_mntent.c \
getusername.c get_label_uuid.c mount_by_label.c mount_blkid.c \
$(MNTHDRS)
umount_LDADD = $(top_srcdir)/lib/libenv.a
+umount_CFLAGS = $(SUID_CFLAGS)
swapon_SOURCES = swapon.c xmalloc.c \
get_label_uuid.c mount_by_label.c mount_blkid.c \