Bug 1641 - pam_winbind only works w/ regular application programs if linked with --no-undefined
Summary: pam_winbind only works w/ regular application programs if linked with --no-un...
Status: RESOLVED DUPLICATE of bug 1474
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.6
Hardware: All Solaris
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2004-08-20 14:58 UTC by Maximilian Kolmhuber
Modified: 2004-10-05 15:32 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Kolmhuber 2004-08-20 14:58:11 UTC
pam_winbind works perfectly if it is executed by the operating system itself.

The moment you write your own PAM-based application, pam_winbind failes to load 
and you can find syslog entries that indicate that pam_winbind did not load due 
to unresolved symbols.

While searching for possible solutions on the internet, a found a document that 
explicitly stated that a PAM module needs be linked against all resources it 
uses and that there must not be any unresolved symbols.

In fact, the moment I changed my source/Makefile.in from

nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_PICOBJ) bin/.dummy
        @echo "Linking $@"
        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \
                @SONAMEFLAG@`basename $@` -lpam


nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_PICOBJ) bin/.dummy
        @echo "Linking $@"
        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_PICOBJ) \
                -Wl,--no-undefined \
                -lpam $(DYNEXP) -lsocket -lc \
                @SONAMEFLAG@`basename $@`

on my Solaris 8 box, my own application program worked immediately.

Since the libraries required to satisfy the --no-undefined rule are rather 
platform dependent, a fix probably requires some additional configuration 

On the other hand, for somemone who is not really experienced in that 
programming field, this problem is really tough to tackle ...
Comment 1 Jelmer Vernooij 2004-10-05 15:32:30 UTC
This is actually just one bug, and it appears to be Solaris-specific. 
I don't have access to any Solaris boxes here, so I can't work at a fix at 
the moment. Sorry :-(

*** This bug has been marked as a duplicate of 1474 ***