Samba4 insists on linking with pam

Sam Liddicott sam at liddicott.com
Thu Sep 8 05:59:55 MDT 2011


On Thu, Sep 8, 2011 at 7:36 AM, Sam Liddicott <sam at liddicott.com> wrote:

>
> On Wed, Sep 7, 2011 at 7:54 PM, Jelmer Vernooij <jelmer at samba.org> wrote:
>
>> On 09/07/2011 05:45 PM, Sam Liddicott wrote:
>>
>>> Samba4 build process tries to link with any pam files it can find.
>>>
>>> During configure I specified --without-pam --without-pam_smbpass so I
>>> can't work out why it is. The header files may be found but the libraries
>>> are not available and I don't want to link with them anyway.
>>>
>>> How do I reign in samba's over-eagerness?
>>>
>> I don't think it's possible to exclude pam at the moment - our check for
>> it appears to be unconditional, though it shouldn't be too hard to add a
>> command-line option to make it optional.
>>
>> The relevant files are:
>> source4/auth/wscript_configure
>> nsswitch/wscript_configure
>>
>
> Seems like the correct fix is something like:

diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index d79ebc1..20c18b5 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -144,7 +144,7 @@ static NTSTATUS talloc_getpwnam(TALLOC_CTX *ctx, const
char *username, struct pa
 }


-#ifdef HAVE_SECURITY_PAM_APPL_H
+#if defined(HAVE_SECURITY_PAM_APPL_H) && defined(WITH_PAM)
 #include <security/pam_appl.h>

 struct smb_pam_user_info {


More information about the samba-technical mailing list