summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2012-05-29 15:15:38 +0200
committerKarel Zak2012-05-29 15:15:38 +0200
commitaec9ecbd6c0e34739d61d23bb4c47f3f080d8de1 (patch)
treec051875dcfea7dbed3ce50503dde6fff4495130c
parentbuild-sys: add --disable-su (diff)
downloadkernel-qcow2-util-linux-aec9ecbd6c0e34739d61d23bb4c47f3f080d8de1.tar.gz
kernel-qcow2-util-linux-aec9ecbd6c0e34739d61d23bb4c47f3f080d8de1.tar.xz
kernel-qcow2-util-linux-aec9ecbd6c0e34739d61d23bb4c47f3f080d8de1.zip
build-sys: add --enable-newgrp
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--configure.ac11
-rw-r--r--login-utils/Makefile.am23
2 files changed, 21 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index ad10cfd19..c586481fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -637,6 +637,7 @@ if test "x$enable_most_builds" = xyes; then
enable_reset=yes
enable_login_utils=yes
enable_chfn_chsh=yes
+ enable_newgrp=yes
enable_write=yes
fi
@@ -1020,7 +1021,7 @@ AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes)
AC_ARG_ENABLE([login-utils],
- AS_HELP_STRING([--enable-login-utils], [build newgrp, vipw]),
+ AS_HELP_STRING([--enable-login-utils], [build vipw]),
[], enable_login_utils=no
)
UL_BUILD_INIT([login_utils])
@@ -1028,6 +1029,14 @@ UL_REQUIRES_HAVE([login_utils], [security_pam_misc_h], [PAM header file])
AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$build_login_utils" = xyes)
+AC_ARG_ENABLE([newgrp],
+ AS_HELP_STRING([--enable-newgrp], [build newgrp]),
+ [], enable_newgrp=no
+)
+UL_BUILD_INIT([newgrp])
+AM_CONDITIONAL(BUILD_NEWGRP, test "x$build_newgrp" = xyes)
+
+
AC_ARG_ENABLE([chfn-chsh],
AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]),
[], enable_chfn_chsh=no
diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am
index d02a282c4..624ddc393 100644
--- a/login-utils/Makefile.am
+++ b/login-utils/Makefile.am
@@ -88,14 +88,22 @@ su_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
su_LDADD = -lpam -lpam_misc
endif
+if BUILD_NEWGRP
+usrbin_exec_PROGRAMS += newgrp
+dist_man_MANS += newgrp.1
+newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+newgrp_LDADD =
+if HAVE_LIBCRYPT
+newgrp_LDADD += -lcrypt
+endif
+endif # BUILD_NEWGRP
+
if BUILD_LOGIN_UTILS
-usrbin_exec_PROGRAMS += \
- newgrp
usrsbin_exec_PROGRAMS += \
vipw
dist_man_MANS += \
- newgrp.1 \
vigr.8 \
vipw.8
@@ -104,21 +112,12 @@ vipw_SOURCES = \
setpwnam.h \
$(top_srcdir)/lib/fileutils.c
-newgrp_LDADD =
vipw_LDADD =
-newgrp_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
-newgrp_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-
-if HAVE_LIBCRYPT
-newgrp_LDADD += -lcrypt
-endif
-
if HAVE_SELINUX
vipw_LDADD += -lselinux
endif
-
install-exec-hook::
cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr