Samba4 insists on linking with pam

Andrew Bartlett abartlet at samba.org
Thu Sep 8 06:03:57 MDT 2011


On Thu, 2011-09-08 at 12:59 +0100, Sam Liddicott wrote:
> 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 {

Did that actually fix it for you?  I would expect you to need to hack
the wscript files a little...

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list