public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Cody Maloney <cmaloney@theoreticalchaos.com>
To: util-linux@vger.kernel.org
Cc: mitr@redhat.com, Cody Maloney <cmaloney@theoreticalchaos.com>
Subject: [PATCH v3 1/4] chsh-chfn: Add flag for enabling/disabling libuser support.
Date: Wed,  6 Feb 2013 23:22:18 -0700	[thread overview]
Message-ID: <1360218141-4463-2-git-send-email-cmaloney@theoreticalchaos.com> (raw)
In-Reply-To: <1360218141-4463-1-git-send-email-cmaloney@theoreticalchaos.com>


Signed-off-by: Cody Maloney <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 d26a686..cf6e922 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1126,6 +1126,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 >= 0.58])
+  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


  reply	other threads:[~2013-02-07  6:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  6:22 [PATCH v3 0/4] Add support for using libuser to chsh and chfn Cody Maloney
2013-02-07  6:22 ` Cody Maloney [this message]
2013-02-13 12:51   ` [PATCH v3 1/4] chsh-chfn: Add flag for enabling/disabling libuser support Karel Zak
2013-02-07  6:22 ` [PATCH v3 2/4] chsh-chfn: Move pam auth to its own function, factoring out common code Cody Maloney
2013-02-13 12:53   ` Karel Zak
2013-02-13 20:33     ` Cody Maloney
2013-02-07  6:22 ` [PATCH v3 3/4] chsh: Add libuser support Cody Maloney
2013-02-13 12:55   ` Karel Zak
2013-02-07  6:22 ` [PATCH v3 4/4] chfn: " Cody Maloney
2013-02-13 13:15   ` Karel Zak
2013-02-13 20:38     ` 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=1360218141-4463-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