Bug 1547 - pam_smbpass does not initialize vars from config file
pam_smbpass does not initialize vars from config file
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools
3.0.4
Sparc Solaris
: P3 regression
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-22 04:20 UTC by Gary Algier
Modified: 2006-04-08 22:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Algier 2004-07-22 04:20:14 UTC
It appears that pam_smbpass does not initialize several internal variables from
parameters in the config file or does not set them to defaults when they are not
in the config file.  This manifests as syslog messages with:
    Cannot access samba password database
Performing a "truss" on a test application one can see some strange
open() system calls:
20247:  open64("/secrets.tdb", O_RDWR|O_CREAT, 0600)    = 3
20247:  open64("", O_WRONLY|O_APPEND|O_CREAT, 0644)     Err#2 ENOENT
20247:  open64("", O_WRONLY|O_APPEND|O_CREAT, 0644)     Err#2 ENOENT 

I _know_ I don't have my private dir set to "/" and I don't know what it is
trying to open that has a value of "".

I know it successfully opens the config files:
20247:  open64("/etc/ulcmit/samba/smb.conf.pamsmbpass", O_RDONLY) = 3
20247:  open64("/etc/ulcmit/samba/smb.conf", O_RDONLY)  = 3
(The former is set with the smbconf= pam config, the latter is an included
file).

If I set smbconf=/dev/null, the defaults lead to the same problem.
If I do a "testparm -s" to a file and use that, the same problem.
The smbd, nmbd, smbstatus, et.al. all work fine on this system.

This was built using gcc 3.2.3 using:
./configure \
        --prefix=/opt/ulcmit \
        --sysconfdir=/etc/ulcmit \
        --localstatedir=/var/ulcmit \
        --with-configdir=/etc/ulcmit/samba \
        --with-privatedir=/var/ulcmit/samba/private \
        --with-lockdir=/var/ulcmit/samba/locks \
        --with-piddir=/var/ulcmit/samba/locks \
        --with-logfilebase=/var/ulcmit/samba/log \
        --without-readline \
        --with-ldap \
        --with-acl-support \
        --with-quotas \
        --with-utmp \
        --enable-cups \
        --without-winbind \
        --with-pam_smbpass \
        --with-ldapsam
Comment 1 Norbert Schmidt 2005-05-05 09:15:16 UTC
I had the same problem with nss_config.h. The compiler searched and included the
wrong <config.h>! In my case it was from /usr/local/mysql/include. 

Quick hack solution:

try and replace 
#include <config.h> 
with 
#include "../include/config.h"

Comment 2 Gerald (Jerry) Carter 2006-04-08 22:33:25 UTC
this is fixed.