lists.arthurdejong.org
RSS feed

Re: [nssldap] Solaris 10 update 5 - nss_ldap makes nscd dump core

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: [nssldap] Solaris 10 update 5 - nss_ldap makes nscd dump core



Hello Howard,

> Did these changes ever get released into the mainstream?

nothing that I'm aware off. But The native ldap client of Solaris is
very usable these days (Solaris 10 Update 8).

> I have recently ported my patches to Solaris 10u5 but the code does
> not seem to be being called and I wanted to check whether I had missed
> some interface changes that need to be incorporated.

In my experience the code doesn't get called if a) nscd is running or b)
your shared object doesn't find it's libraries. You can check very
easily using:

ldd /path/to/nss-ldap.so

> Also, if anybody has a configure and compile stanza that works on
> Solaris 10 with native compilers and libraries would they be willing
> to share?

I have something that links the dependencies static using the native
compilers:

export CC=cc
export CXX=CC
export 
PATH="/opt/SunStudio12u1/sunstudio12.1/bin:/usr/ccs/bin:/usr/bin:/opt/csw/bin"

(
        cd Libnet-1.0.2a
        ./configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies
        gmake
        gmake install
)

export LDFLAGS='-L/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/lib'
export 
CPPFLAGS='-I/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/include'

(
        cd openssl-0.9.8l
        ./Configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies shared 
solaris-x86-cc
        gmake
        gmake install
)

(
        cd krb5-1.4.4/src
        ./configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies 
--exec-prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies 
--enable-static
        gmake
        gmake install
)

(
        cd cyrus-sasl-2.1.23
        ./configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies 
--with-staticsasl
        gmake
        gmake install
)

(
        cd db-4.8.24/build_unix
        ../dist/configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies 
--disable-shared
        gmake
        gmake install
)

(
        cd openldap-2.4.21
        LIBS="-lrt" ./configure 
--prefix=/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies
        gmake
        gmake install
)

(
        cd nss_ldap-260
        ./configure --exec-prefix=/usr --infodir=/usr/share/info 
--mandir=/usr/share/man --enable-schema-mapping --enable-rfc2307bis 
--enable-configurable-krb5-ccname-gssapi
        gmake
        cc  -g  -L/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/lib 
-o nss_ldap.so -Bdirect -z nodelete -Bdynamic -M ./exports.solaris -G 
ldap-nss.o ldap-pwd.o ldap-grp.o ldap-netgrp.o ldap-rpc.o ldap-hosts.o 
ldap-network.o ldap-proto.o ldap-spwd.o ldap-alias.o ldap-service.o 
ldap-schema.o ldap-ethers.o ldap-bp.o ldap-automount.o util.o ltf.o snprintf.o 
resolve.o dnsconfig.o irs-nss.o pagectrl.o ldap-sldap.o ldap-init-krb5-cache.o  
-Bstatic -lldap -llber -lsasl2 -Bstatic -lssl -lcrypto -lgssapi_krb5 -lcom_err 
-lkrb5 -lk5crypto -lkrb5support -Bdynamic -ldl -lsocket -lnsl -lresolv

        Thomas
# vim: ft=perl

$progname = 'nss_ldap';
$version = '260';

my $libnet_version = '1.0.2a';
my $openssl_version = '0.9.8l';
my $krb5_version = '1.4.4'; # Newer versions can not be linked static
my $sasl_version = '2.1.23';
my $openldap_version = '2.4.21';
my $berkeley_version = '4.8.24';

# TODO: Search for krb5.conf in /etc/krb5/krb5.conf
# At the moment it tries the following two paths:
# /etc/krb5.conf
# /var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/etc/krb5.conf

# it also searches for ldap.conf in the wrong location, but it doesn't matter.
# 
open("/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/etc/openldap/ldap.conf",
 O_RDONLY) Err#2 ENOENT
# 
stat("/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/etc/krb5.conf", 
0xFFBFE798) Err#2 ENOENT

$buildroot = "${builddir}/${progname}-${version}-buildroot";

$category  = 'application';
$vendor    = 'http://www.padl.com/ packaged by Thomas Glanzmann';

@sources   = ("${progname}.tgz",
               "libnet-${libnet_version}.tar.gz",
               "openssl-${openssl_version}.tar.gz",
               "krb5-${krb5_version}.tar.gz",
               "cyrus-sasl-${sasl_version}.tar.gz",
               "openldap-${openldap_version}.tgz",
               "db-${berkeley_version}.tar.gz",
);

@patches   = (['nss_ldap.patch', "${progname}-${version}", '-p1']);
              
@packages  = ({
                pkgname      => 'nssldap',
                filename     => 'nss_ldap',
                name         => "nssldap - retrieve system databases from LDAP 
directories",
                dependencies => [],
                filelist     => [qw(usr)]
                });

$copyright = "${progname}-${version}/COPYING";

$build     = <<"EOF";
export CC=cc
export CXX=CC
export PATH="${sunwspropath}:/usr/ccs/bin:/usr/bin:/opt/csw/bin"

(
        cd Libnet-${libnet_version}
        ./configure --prefix=${buildroot}/dependencies
        gmake
        gmake install
)

export LDFLAGS='-L${buildroot}/dependencies/lib'
export CPPFLAGS='-I${buildroot}/dependencies/include'

(
        cd openssl-${openssl_version}
        ./Configure --prefix=${buildroot}/dependencies shared solaris-x86-cc
        gmake
        gmake install
)

(
        cd krb5-${krb5_version}/src
        ./configure --prefix=${buildroot}/dependencies 
--exec-prefix=${buildroot}/dependencies --enable-static
        gmake
        gmake install
)

(
        cd cyrus-sasl-${sasl_version}
        ./configure --prefix=${buildroot}/dependencies --with-staticsasl
        gmake
        gmake install
)

(
        cd db-${berkeley_version}/build_unix
        ../dist/configure --prefix=${buildroot}/dependencies --disable-shared
        gmake
        gmake install
)

(
        cd openldap-${openldap_version}
        LIBS="-lrt" ./configure --prefix=${buildroot}/dependencies
        gmake
        gmake install
)

(
        cd ${progname}-${version}
        ./configure --exec-prefix=/usr --infodir=/usr/share/info 
--mandir=/usr/share/man --enable-schema-mapping --enable-rfc2307bis 
--enable-configurable-krb5-ccname-gssapi
        gmake
        cc  -g  -L${buildroot}/dependencies/lib -o nss_ldap.so -Bdirect -z 
nodelete -Bdynamic -M ./exports.solaris -G ldap-nss.o ldap-pwd.o ldap-grp.o 
ldap-netgrp.o ldap-rpc.o ldap-hosts.o ldap-network.o ldap-proto.o ldap-spwd.o 
ldap-alias.o ldap-service.o ldap-schema.o ldap-ethers.o ldap-bp.o 
ldap-automount.o util.o ltf.o snprintf.o resolve.o dnsconfig.o irs-nss.o 
pagectrl.o ldap-sldap.o ldap-init-krb5-cache.o  -Bstatic -lldap -llber -lsasl2 
-Bstatic -lssl -lcrypto -lgssapi_krb5 -lcom_err -lkrb5 -lk5crypto -lkrb5support 
-Bdynamic -ldl -lsocket -lnsl -lresolv
)

        # cc -o pam_krb5.so -G -xldscope=symbolic  
-L/var/tmp/sithglan-pkg/nss_ldap-260-buildroot/dependencies/lib api-account.o 
api-auth.o api-password.o api-session.o  auth.o compat.o context.o logging.o 
options.o prompting.o  support.o -L/usr/lib -R/usr/lib -Bstatic -lgssapi_krb5 
-lcom_err -lkrb5 -lk5crypto -lkrb5support -Bdynamic -lpam -lresolv  -lsocket   
-lnsl
EOF