summaryrefslogtreecommitdiffstats
path: root/login-utils/Makefile.am
diff options
context:
space:
mode:
authorKarel Zak2010-01-27 13:31:16 +0100
committerKarel Zak2010-01-27 13:31:16 +0100
commita43c6fc90de687d0539c6bde74fca4222e58ca4e (patch)
tree4aa986cd9e1eab5b7339d38ae73a3d50c6919ae8 /login-utils/Makefile.am
parentcfdisk: use libblkid (diff)
downloadkernel-qcow2-util-linux-a43c6fc90de687d0539c6bde74fca4222e58ca4e.tar.gz
kernel-qcow2-util-linux-a43c6fc90de687d0539c6bde74fca4222e58ca4e.tar.xz
kernel-qcow2-util-linux-a43c6fc90de687d0539c6bde74fca4222e58ca4e.zip
login: don't link PAMed version with libcrypt
The login, chsh and chfn utils don't need to be linked against libcrypt. The libcrypt library is necessary only when login utils are not liked with PAM. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=559196 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/Makefile.am')
-rw-r--r--login-utils/Makefile.am32
1 files changed, 16 insertions, 16 deletions
diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am
index 177c0b63a..920a6e7cc 100644
--- a/login-utils/Makefile.am
+++ b/login-utils/Makefile.am
@@ -26,7 +26,7 @@ if NEED_LIBCRYPT
simpleinit_LDADD = -lcrypt
endif
-endif
+endif # BUILD_INIT
if BUILD_LAST
usrbin_exec_PROGRAMS += last
@@ -40,6 +40,9 @@ usrbin_exec_PROGRAMS += chfn chsh newgrp
usrsbin_exec_PROGRAMS += vipw
dist_man_MANS += chfn.1 chsh.1 login.1 newgrp.1 vipw.8 vigr.8
+# login, chfn and chsh libs
+login_ldadd_common =
+
chfn_SOURCES = chfn.c $(chfn_chsh_common)
chsh_SOURCES = chsh.c $(chfn_chsh_common)
chfn_chsh_common = islocal.c setpwnam.c islocal.h my_crypt.h setpwnam.h \
@@ -48,9 +51,9 @@ login_SOURCES = login.c login.h my_crypt.h ../lib/setproctitle.c
newgrp_SOURCES = newgrp.c my_crypt.h
vipw_SOURCES = vipw.c setpwnam.h
-chfn_LDADD =
-chsh_LDADD =
-login_LDADD =
+chfn_LDADD = $(login_ldadd_common)
+chsh_LDADD = $(login_ldadd_common)
+login_LDADD = $(login_ldadd_common)
newgrp_LDADD =
vipw_LDADD =
@@ -62,19 +65,17 @@ 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
-login_LDADD += -lcrypt
-newgrp_LDADD += -lcrypt
-endif
-
if HAVE_PAM
-chfn_LDADD += -lpam -lpam_misc
-chsh_LDADD += -lpam -lpam_misc
-login_LDADD += -lpam -lpam_misc
+login_ldadd_common += -lpam -lpam_misc
else
+if NEED_LIBCRYPT
+login_ldadd_common += -lcrypt
+endif
login_SOURCES += checktty.c
+endif #! HAVE_PAM
+
+if NEED_LIBCRYPT
+newgrp_LDADD += -lcrypt
endif
if HAVE_AUDIT
@@ -83,10 +84,9 @@ endif
if HAVE_SELINUX
chfn_SOURCES += selinux_utils.c selinux_utils.h
-chfn_LDADD += -lselinux
chsh_SOURCES += selinux_utils.c selinux_utils.h
-chsh_LDADD += -lselinux
vipw_LDADD += -lselinux
+login_ldadd_common += -lselinux
endif