[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ITS#6055



> On Mon, 2010-04-19 at 02:15 +0200, masarati@aero.polimi.it wrote:
>> Refactored rdnval.c available at
>>
>> <ftp://ftp.openldap.org/incoming/pierangelo-masarati-2010-04-18-rdnval.c>
>>
>> attempts to repair the database at startup; useful when the overlay is
>> configured for an existing database.  Please test.
>
> Sadly it segfaults on startup (we don't have the DB at startup - we
> expect the first operations to create them).

It's not that sad: this overlay is not intended to be used as global.  You
should use it within any database you want the rdnvalue stored.  I haven't
considered yet how hard it would be to allow it to be global, and if it's
worth.  Since it needs to write operational attributes to the directory,
it may run into issues in case non-local storage databases are used, and
it'd definitely risk to suffer from authentication issues.  Does it make
sense for you to add an instance in each database you need rndvalue for?

p.

> I produced the environment with Samba4 from master
> (538a07a80aae72b57e5c23133158c7f214d0c27a) with the attached additional
> patch
>
> TEST_LDAP=yes OPENLDAP_SLAPD=/usr/local/libexec/slapd make quicktest
>
> This ran:
> '/usr/local/libexec/slapd'
> '-F/scratch/samba-2/source4/st/dc/private/ldap/slapd.d' '-h' 'ldapi://%
> 2Fscratch%2Fsamba-2%2Fsource4%2Fst%2Fdc%2Fprivate%2Fldap%2Fldapi' '-d0'
>
> and running that under gdb produced
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000057ba54 in rdnval_repair (be=0x7fffffffdbe0) at rdnval.c:466
> 466		op->o_req_dn = op->o_bd->be_suffix[ 0 ];
> Missing separate debuginfos, use: debuginfo-install
> glibc-2.11.90-17.x86_64 libgcc-4.4.3-12.fc13.x86_64
> libicu-4.2.1-7.fc12.x86_64 libicu-4.2.1-8.fc13.x86_64 libstdc
> ++-4.4.3-12.fc13.x86_64 libtool-ltdl-2.2.6-18.fc12.x86_64
> libtool-ltdl-2.2.6-18.fc13.x86_64 libuuid-2.17.2-1.fc13.x86_64
> mysql-libs-5.1.45-2.fc13.x86_64 postgresql-libs-8.4.3-1.fc13.x86_64
> (gdb) p op
> $1 = (Operation *) 0x7fffffffd4d0
> (gdb) p op->o_bd
> $2 = (BackendDB *) 0x0
> (gdb) p *op
> $3 = {o_hdr = 0x7fffffffd640, o_tag = 99, o_time = 1271737105, o_tincr =
> 1, o_bd = 0x0, o_req_dn = {bv_len = 0, bv_val = 0x0}, o_req_ndn =
> {bv_len = 0, bv_val = 0x0}, o_request = {oq_add = {rs_modlist = 0x0,
> rs_e = 0x0}, oq_bind = {
>       rb_method = 0, rb_cred = {bv_len = 0, bv_val = 0x0}, rb_edn =
> {bv_len = 0, bv_val = 0x0}, rb_ssf = 0, rb_mech = {bv_len = 0, bv_val =
> 0x0}}, oq_compare = {rs_ava = 0x0}, oq_modify = {rs_mods = {rs_modlist =
> 0x0,
>         rs_no_opattrs = 0 '\000'}, rs_increment = 0}, oq_modrdn =
> {rs_mods = {rs_modlist = 0x0, rs_no_opattrs = 0 '\000'}, rs_deleteoldrdn
> = 0, rs_newrdn = {bv_len = 0, bv_val = 0x0}, rs_nnewrdn = {bv_len = 0,
> bv_val = 0x0},
>       rs_newSup = 0x0, rs_nnewSup = 0x0}, oq_search = {rs_scope = 0,
> rs_deref = 0, rs_slimit = 0, rs_tlimit = 0, rs_limit = 0x0, rs_attrsonly
> = 0, rs_attrs = 0x0, rs_filter = 0x0, rs_filterstr = {bv_len = 0, bv_val
> = 0x0}},
>     oq_abandon = {rs_msgid = 0}, oq_cancel = {rs_msgid = 0}, oq_extended
> = {rs_reqoid = {bv_len = 0, bv_val = 0x0}, rs_flags = 0, rs_reqdata =
> 0x0}, oq_pwdexop = {rs_extended = {rs_reqoid = {bv_len = 0, bv_val =
> 0x0}, rs_flags = 0,
>         rs_reqdata = 0x0}, rs_old = {bv_len = 0, bv_val = 0x0}, rs_new =
> {bv_len = 0, bv_val = 0x0}, rs_mods = 0x0, rs_modtail = 0x0}}, o_abandon
> = 0, o_cancel = 0, o_groups = 0x0, o_do_not_cache = 0 '\000',
> o_is_auth_check = 0 '\000',
>   o_dont_replicate = 0 '\000', o_acl_priv = ACL_NONE, o_nocaching = 0
> '\000', o_delete_glue_parent = 0 '\000', o_no_schema_check = 0 '\000',
> o_no_subordinate_glue = 0 '\000', o_ctrlflag = '\000' <repeats 31
> times>,
>   o_controls = 0x7fffffffd788, o_authz = {sai_method = 0, sai_mech =
> {bv_len = 0, bv_val = 0x0}, sai_dn = {bv_len = 0, bv_val = 0x0}, sai_ndn
> = {bv_len = 0, bv_val = 0x0}, sai_ssf = 0, sai_transport_ssf = 0,
> sai_tls_ssf = 0,
>     sai_sasl_ssf = 0}, o_ber = 0x0, o_res_ber = 0x0, o_callback = 0x0,
> o_ctrls = 0x0, o_csn = {bv_len = 0, bv_val = 0x0}, o_private = 0x0,
> o_extra = {slh_first = 0x0}, o_next = {stqe_next = 0x0}}
> (gdb)
>
>
> --
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> Samba Developer, Cisco Inc.
>
>