From: Cody Maloney <cmaloney@theoreticalchaos.com>
To: util-linux@vger.kernel.org
Cc: mitr@redhat.com, Cody Maloney <cmaloney@theoreticalchaos.com>
Subject: [PATCH 1/3] chsh-chfn: Add flag for enabling/disabling libuser support.
Date: Wed, 2 Jan 2013 20:21:59 -0700 [thread overview]
Message-ID: <1357183321-24637-2-git-send-email-cmaloney@theoreticalchaos.com> (raw)
In-Reply-To: <1357183321-24637-1-git-send-email-cmaloney@theoreticalchaos.com>
---
configure.ac | 17 +++++++++++++++++
login-utils/Makemodule.am | 5 +++++
2 files changed, 22 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9c08fc0..bfe8cba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1095,6 +1095,23 @@ AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/she
[], enable_chsh_only_listed=yes
)
+AC_ARG_WITH([libuser], AS_HELP_STRING([--without-libuser], [compile without libuser (remote chsh)]),
+ [], with_user=auto
+)
+
+if test "x$with_user" = xno; then
+ AM_CONDITIONAL(HAVE_USER, false)
+else
+ PKG_CHECK_MODULES(LIBUSER,[libuser])
+ UL_CHECK_LIB(user, lu_start)
+ case "$with_user:$have_user" in
+ yes:no)
+ AC_MSG_ERROR([user selected but libuser not found])
+ ;;
+ esac
+fi
+
+
if test "x$enable_chsh_only_listed" = xyes; then
AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
fi
diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am
index aef8177..479b87b 100644
--- a/login-utils/Makemodule.am
+++ b/login-utils/Makemodule.am
@@ -68,6 +68,11 @@ chfn_chsh_cflags = $(SUID_CFLAGS) $(AM_CFLAGS)
chfn_chsh_ldflags = $(SUID_LDFLAGS) $(AM_LDFLAGS)
chfn_chsh_ldadd = libcommon.la -lpam -lpam_misc
+if HAVE_USER
+chfn_chsh_ldflags += $(LIBUSER_LIBS)
+chfn_chsh_cflags += $(LIBUSER_CFLAGS)
+endif
+
if HAVE_SELINUX
chfn_chsh_sources += \
login-utils/selinux_utils.c \
--
1.8.1
next prev parent reply other threads:[~2013-01-03 3:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 9:12 [PATCH v2 0/4] Add support for using libuser to chsh and chfn Cody Maloney
2013-01-03 3:21 ` [PATCH 0/3] Add support for using libuser to chsh Cody Maloney
2013-01-03 3:21 ` Cody Maloney [this message]
2013-01-03 3:22 ` [PATCH 2/3] chsh: Move pam auth to its own function Cody Maloney
2013-01-03 3:22 ` [PATCH 3/3] chsh: Add libuser support Cody Maloney
2013-01-03 16:34 ` Miloslav Trmac
2013-01-07 11:51 ` Karel Zak
2013-01-08 6:15 ` Cody Maloney
2013-01-08 6:17 ` Cody Maloney
2013-01-08 6:18 ` Cody Maloney
2013-01-13 9:12 ` [PATCH 2/3] chsh: Move pam auth to its own function Cody Maloney
2013-01-13 9:12 ` [PATCH v2 1/4] chsh-chfn: Add flag for enabling/disabling libuser support Cody Maloney
2013-01-13 9:12 ` [PATCH v2 2/4] chsh-chfn: Move pam auth to its own function, factoring out common code Cody Maloney
2013-01-13 9:12 ` [PATCH v2 3/4] chsh: Add libuser support Cody Maloney
2013-01-14 18:16 ` Miloslav Trmac
2013-01-17 0:52 ` Cody Maloney
2013-01-28 22:01 ` Miloslav Trmac
2013-01-13 9:12 ` [PATCH v2 4/4] chfn: " Cody Maloney
[not found] ` <50F2FBBE.7000305@gmail.com>
2013-01-13 19:31 ` [PATCH v2 0/4] Add support for using libuser to chsh and chfn Cody Maloney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357183321-24637-2-git-send-email-cmaloney@theoreticalchaos.com \
--to=cmaloney@theoreticalchaos.com \
--cc=mitr@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox