Proposed changes to configure.in for Samba 2.2.0 for PAM

Richard Sharpe sharpe at ns.aus.com
Fri Nov 10 13:29:54 GMT 2000


Hi,

Here are my proposed changes for configure.in for Samba 2.2.0.

As you can see, I check to see that the PAM libraries exist, and I respect
the setting of --without-pam.

However, things that I do not do is check to see that /etc/pam.d/samba (or
that the equivalent entries exist on Solaris or HP/UX or other PAM-aware
versions of UNIX). 

Is this needed? I have found that the file /etc/pam.d/samba was added
automagically for me by the configure script or something when I enabled PAM.

-----------------------------------8<--------------------------------
--- /home/rsharpe/configure.in	Fri Nov 10 23:23:02 2000
+++ configure.in.new	Mon Nov 13 00:45:17 2000
@@ -1386,7 +1386,29 @@
     AC_MSG_RESULT(no)
     ;;
   esac ],
-  AC_MSG_RESULT(no)
+  [if test "${without_pam+set}" != set; then
+     AC_MSG_CHECKING(whether PAM can be found)
+     OLIBS="$LIBS"
+     LIBS="$LIBS -lpam"
+     AC_TRY_LINK(
+     [#include <security/pam_appl.h>],
+     [int pam_error;struct pam_handle *pamh;struct pam_conv
PAM_conversation;   
+     char *user; pam_error = pam_start("test", user, &PAM_conversation,
&pamh);
+     ],
+     ac_cv_header_security_pam_appl_h=yes,
+     ac_cv_header_security_pam_appl_h=no,
+     )
+     LIBS="$OLIBS"
+     if test $ac_cv_header_security_pam_appl_h = yes; then
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(WITH_PAM)
+       LIBS="$LIBS -lpam"
+     else
+       AC_MSG_RESULT(no)
+     fi
+   else
+     AC_MSG_RESULT(no)
+   fi]
 )
 
 #################################################
-------------------------------------------8<---------------------------

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba






More information about the samba-technical mailing list