Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163652 - net-nds/openldap-2.3.30-r2 segfaults after activating smbk5passwd overlay
Summary: net-nds/openldap-2.3.30-r2 segfaults after activating smbk5passwd overlay
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 20:26 UTC by Matthias Nagl
Modified: 2007-04-06 11:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Nagl 2007-01-24 20:26:42 UTC
I want to use the openldap smbk5passwd overlay for syncing my ldap and samba passwords. whenever I enable it openldap won't start anymore. after adding -d 31 to the /etc/conf.d/slapd OPTS I get the following messages:

------------------------------------------------
 * Starting ldap-server ...
@(#) $OpenLDAP: slapd 2.3.30 (Jan 24 2007 19:23:19) $
        root@gauss2:/var/tmp/portage/openldap-2.3.30-r2/work/openldap-2.3.30/servers/slapd
daemon_init: <null>
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
daemon: IPv6 socket() failed errno=97 (Address family not supported by protocol)
daemon: listener initialized ldap:///
daemon_init: 2 listeners opened
slapd init: initiated server.
slap_sasl_init: initialized!
bdb_back_initialize: initialize BDB backend
bdb_back_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
>>> dnNormalize: <>
<<< dnNormalize: <>
>>> dnNormalize: <cn=Subschema>
=> ldap_bv2dn(cn=Subschema,0)
<= ldap_bv2dn(cn=Subschema)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=subschema)=0
<<< dnNormalize: <cn=subschema>
bdb_db_init: Initializing BDB database
/lib/rcscripts/sh/rc-daemon.sh: line 229: 15848 Speicherzugriffsfehler  /sbin/start-stop-daemon '--start' '--quiet' '--pidfile' '/var/run/openldap/slapd.pid' '--exec' '/usr/lib/openldap/slapd' '--' '-u' 'ldap' '-g' 'ldap' '-d' '31'
------------------------------------------------
Speicherzugriffsfehler = Segmentation Fault (german locale)

Reproducible: Always

Steps to Reproduce:
1.activate smbk5passwd
2./etc/init.d/slapd start
3.segmentation fault
Actual Results:  
openldap crashes

Expected Results:  
openldap should start and smbk5passwd should synchronize my passwords

My slapd.conf looks like this:

------------------------------------------------------
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
include         /etc/openldap/schema/samba.schema
include         /etc/openldap/schema/krb5-kdc.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org

pidfile         /var/run/openldap/slapd.pid
argsfile        /var/run/openldap/slapd.args

# Load dynamic backend modules:
modulepath      /usr/lib/openldap/openldap
moduleload      smbk5pwd.so
# moduleload    back_bdb.la
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la


authz-regexp
        uid=([^,]*),cn=([^,]*),cn=auth
        uid=$1,ou=people,dc=physik,dc=uni-marburg,dc=de

# Sample security restrictions
#       Require integrity protection (prevent hijacking)
#       Require 112-bit (3DES or better) encryption for updates
#       Require 63-bit encryption for simple bind
#security ssf=1 update_ssf=112 simple_bind=64

# Sample access control policy:
#       Root DSE: allow anyone to read it
#       Subschema (sub)entry DSE: allow anyone to read it
#       Other DSEs:
#               Allow self write access
#               Allow authenticated users read access
#               Allow anonymous users to authenticate
#       Directives needed to implement policy:
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
access to *
        by self write
        by users read
        by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn.  (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!

#######################################################################
# BDB database definitions
#######################################################################

database        bdb
overlay         smbk5pwd
smbk5pwd-enable samba
suffix          "dc=physik,dc=uni-marburg,dc=de"
checkpoint      32      30 # <kbyte> <min>
rootdn          "cn=Manager,dc=physik,dc=uni-marburg,dc=de"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          {SSHA}secret
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory       /var/lib/openldap-data
# Indices to maintain
index   objectClass     eq
------------------------------------------------------

the use-flags look this way:
[ebuild   R   ] net-nds/openldap-2.3.30-r2  USE="berkdb crypt ipv6 kerberos overlays perl readline samba sasl smbkrb5passwd ssl tcpd -debug -gdbm -minimal -odbc (-selinux) -slp" 0 kB
Comment 1 Markus Ullmann (RETIRED) gentoo-dev 2007-01-25 23:35:49 UTC
Seems to work here with hdb backend. Please retry with it instead of bdb
Comment 2 Matthias Nagl 2007-01-31 00:16:41 UTC
Could you please post your working config/use-flags? I'd like to try if it works for me too to track down the reason for the segfaults.
Comment 3 Matthias Nagl 2007-01-31 16:59:30 UTC
The problem seems to be in the kerberos part of the smbk5passwd-module because it disappeared after removing -DDO_KRB from the ebuild-file. Could you please change the ebuild that it only adds this option if the kerberos-use-flag is set?

The reason is not that kerberos would be missing. It is installed but not configured in my installation. So my suggestion is only a workaround for people only using the samba-part. Is is necessary to have a running kerberos in order to use this module or should it work anyway?
Comment 4 Markus Ullmann (RETIRED) gentoo-dev 2007-04-05 19:13:34 UTC
well I always assume that people only set useflags if they intend to actually use that piece and have it configured ;)

already collecting issues for a -r1 release. your solution is noted for it now
Comment 5 Markus Ullmann (RETIRED) gentoo-dev 2007-04-06 11:05:40 UTC
meh, there should be a better option to resolve a bug with other reason
Comment 6 Markus Ullmann (RETIRED) gentoo-dev 2007-04-06 11:05:49 UTC
Fixed in 2.3.34-r1 :=)

thanks for reporting