[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldap_delete_s:Bus error
Rakesh Yadav wrote:
> Hi,
>
> I am using ldap api's in the given sequence:
>
> LDAP* ld = ldap_init()
> ......
> ldap_set_options( ld,....)
> ......
> ldap_bind_s( ld,.....)
> ......
> ldap_search( ld,.....)
>
> =============>till that function code is wroking fine.
> ldap_delete_s( ld,....)
ldap_init(), ldap_bind_s(), ldap_search(), ldap_delete_s() are
deprecated and their declaration is not usually present in the ldap.h
header. As such, your problem could be related to erroneous
compilation. Please only use non-deprecated function calls. Use
ldap_initialize(), ldap_sasl_bind_s(), ldap_search_ext(),
ldap_delete_ext_s() instead. Please refer to their documentation for
usage details. Please enable compiler warnings to help tracking the use
of undeclared functions and other subtle errors.
>
> Here i am getting error :
> Bus error
>
> I have given the debug statements from ldap_search_s() to ldap_delete_s()
>
> Debug statements:
> ---------------------------------------------------------------------------------------------------------------------------
> connection_get(11): got connid=6
> connection_read(11): checking for input on id=6
> ber_get_next
> ber_get_next: tag 0x30 len 82 contents:
> ber_get_next
> do_search
> ber_scanf fmt ({miiiib) ber:
>>>> dnPrettyNormal: <groupName=MIG,dc=cdac,dc=in>
> <<< dnPrettyNormal: <groupName=MIG,dc=cdac,dc=in>, <groupName=mig,dc=cdac,dc=in>
> ber_scanf fmt ({mm}) ber:
> ber_scanf fmt ({M}}) ber:
> => bdb_search
> bdb_dn2entry("groupName=mig,dc=cdac,dc=in")
> => send_search_entry: conn 6 dn="groupName=MIG,dc=cdac,dc=in"
> ber_flush: 54 bytes to sd 11
> <= send_search_entry: conn 6 exit.
> send_ldap_result: conn=6 op=1 p=3
> send_ldap_response: msgid=2 tag=101 err=0
> ber_flush: 14 bytes to sd 11
> Returned dn: groupName=MIG,dc=cdac,dc=in
> ggid: 1001
>
> MMI_DELETE_USR_FROM_GROUP:gid=1001
>
> MMI_DELETE_USR_FROM_GROUP:Want to delete=>ggid=1001,dc=cdac,dc=in
> connection_get(11): got connid=6
> connection_read(11): checking for input on id=6
> ber_get_next
> ber_get_next on fd 11 failed errno=0 (Success)
> connection_closing: readying conn=6 sd=11 for close
> connection_close: conn=6 sd=11
> Bus error
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> Slapd.conf:
> ------------------
>
> # See slapd.conf(5) for details on configuration options.
> # This file should NOT be world readable.
> #
> include /usr/local/etc/openldap/schema/core.schema
> include /usr/local/etc/openldap/schema/cosine.schema
> include /usr/local/etc/openldap/schema/inetorgperson.schema
> include /usr/local/etc/openldap/schema/new_core.schema
> include /usr/local/etc/openldap/schema/gfsUserManage.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 /usr/local/var/run/slapd.pid
> argsfile /usr/local/var/run/slapd.args
>
> #######################################################################
> # BDB database definitions
> #######################################################################
>
> database bdb
> suffix "dc=cdac,dc=in"
> rootdn "cn=Manager,dc=cdac,dc=in"
> # Cleartext passwords, especially for the rootdn, should
> # be avoid. See slappasswd(8) and slapd.conf(5) for details.
> # Use of strong authentication encouraged.
> rootpw 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 /usr/local/var/openldap-data
> # Indices to maintain
> index objectClass eq
> olcAccess: to * by * write
The above is not a valid slapd.conf statement; don't expect it to work.
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Please tell why i am getting this error?
> How can i overcome it?
Fix your code as indicated above.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati@sys-net.it
---------------------------------------