Re: Question about disabling PAM

Simon Horman <[email protected]>
Newsgroups gmane.mail.perdition.user
Message-ID <[email protected]>
On Sun, Jul 25, 2010 at 05:54:45PM +0200, Joachim Sehlstedt wrote:
>   Hi,
> 
> Is there any other way to disable linking against PAM beside editing the 
> configure script and changing pam=yes into pam=no? Adding a 
> --disable-pam option would be great.

Good idea, can you try this patch?

# HG changeset patch
# User Simon Horman <[email protected]>
# Date 1280117159 -32400
# Node ID fd01f6ec07d8967624e6c5dea9d69ec40320b531
# Parent  e2c76d67a58540aca50465a160b81488044d2eb1
configure: Add --disable-pam

As requested by Joachim Sehlstedt <[email protected]>

Signed-off-by: Simon Horman <[email protected]>

diff -r e2c76d67a585 -r fd01f6ec07d8 configure.ac
--- a/configure.ac	Sat Jul 24 14:45:18 2010 +0900
+++ b/configure.ac	Mon Jul 26 13:05:59 2010 +0900
@@ -884,7 +884,24 @@
 ######################################################################
 # PAM
 
-pam=yes
+AC_MSG_CHECKING([if PAM support has been disabled]);
+AC_ARG_ENABLE(
+  pam,
+  [  --disable-pam           DO not compile with pam support.  ],
+  [ 
+    if test "$enable_pam" = "no"; then
+      AC_MSG_RESULT("yes")
+    else
+      AC_MSG_RESULT("no")
+    fi
+  ],
+  [ 
+    enable_pam="yes";
+    AC_MSG_RESULT("no") 
+  ]
+)
+
+if test "$enable_pam" == "yes"; then
 AC_CHECK_HEADERS(
   security/pam_appl.h, 
   true,
@@ -899,8 +916,9 @@
     sleep 5
   ]
 )
+fi
 
-if test $pam = yes; then
+if test "$enable_pam" == "yes"; then
 AC_CHECK_HEADERS(security/pam_misc.h)
 
 AC_CHECK_LIB(
@@ -921,14 +939,14 @@
 )
 fi
 
-if test "$pam" = "yes"; then
+if test "$enable_pam" == "yes"; then
   pam_lib="-lpam"
   AC_DEFINE(WITH_PAM_SUPPORT, 1, Compile with PAM support)
 else
   pam_lib=""
 fi
 
-AM_CONDITIONAL(PAM_BUILD, test "$pam" = "yes")
+AM_CONDITIONAL(PAM_BUILD, test "$enable_pam" = "yes")
 
 
 posix_regex_libs="-lvanessa_logger -lvanessa_adt"
______________________________________________
Perdition-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/perdition-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.