See the INSTALL file for more details.
Notes:
- * use SUID_CFLAGS when you want to define special compiler options
+ * use SUID_CFLAGS and SUID_LDFLAGS when you want to define special compiler options
for typical suid programs, for example:
- SUID_CFLAGS="-fpic" ./configure
+ SUID_CFLAGS="-fpie" SUID_LDFLAGS="-pie" ./configure
Now this feature is supported for chfn, chsh, newgrp, write,
mount and umount.
AC_SUBST([SUID_CFLAGS])
+AC_SUBST([SUID_LDFLAGS])
LIBS=""
chsh_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+chfn_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+chsh_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+
if NEED_LIBCRYPT
chfn_LDADD += -lcrypt
chsh_LDADD += -lcrypt
usrbinexec_PROGRAMS += write
man_MANS += write.1
write_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
if USE_TTY_GROUP
install-exec-hook::
mount_LDADD = $(top_srcdir)/lib/libenv.a $(top_srcdir)/lib/libsetproctitle.a
mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
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 \
umount_LDADD = $(top_srcdir)/lib/libenv.a
umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
swapon_SOURCES = swapon.c xmalloc.c \
get_label_uuid.c mount_by_label.c mount_blkid.c \