[PATCHES] idmap_rfc2307 with test

Andrew Bartlett abartlet at samba.org
Fri Mar 1 14:42:52 MST 2013


On Fri, 2013-03-01 at 13:48 -0700, Christof Schmitt wrote:
> On Fri, Mar 01, 2013 at 03:33:33PM +1100, Andrew Bartlett wrote:
> > On Thu, 2013-02-21 at 14:41 -0700, Christof Schmitt wrote:
> > > Here is an updated version of the idmap_rfc2307 module. The patches
> > > apply to current master. The first five patches eliminate some code
> > > duplication and allow the reuse of some ad and ldap code.  The last
> > > patch implements a testcase for the new idmap module.
> > 
> > I wanted to push this (except the LD_LIBRARY_PATH patch, which I don't
> > think is required, or should be better justified), but even with that I
> > got:
> 
> I thought, that i had to add the path to the idmap module, so that
> winbind can load it. But it seems that it is not required, the test
> also works without the LD_LIBRAR_PATH change. So this patch is not
> required and can be dropped.

Thanks.  Indeed, we load modules using dlopen() so we don't need this. 

> > initialize_winbindd_cache: clearing cache and re-creating with version
> > number 2
> > [1/2 in 0s] idmap.rfc2307
> > SAMBADOMAIN\Administrator resolved to 100000
> > UNEXPECTED(failure): idmap.rfc2307.test 100000 -eq
> > 2000000(s3member_rfc2307)
> > REASON: _StringException: _StringException:
> > SAMBADOMAIN\Domain Users resolved to 100003
> > UNEXPECTED(failure): idmap.rfc2307.test 100003 -eq
> > 2000001(s3member_rfc2307)
> > REASON: _StringException: _StringException:
> > command: /data/samba/git/samba-push/source3/../nsswitch/tests/test_idmap_rfc2307.sh $DOMAIN Administrator 2000000 "Domain Users" 2000001 ou=idmap,dc=samba,dc=example,dc=com 2>&1 | /data/samba/git/samba-push/selftest/filter-subunit --fail-on-empty --prefix="idmap.rfc2307." --suffix="(s3member_rfc2307)"
> > expanded
> > command: /data/samba/git/samba-push/source3/../nsswitch/tests/test_idmap_rfc2307.sh SAMBADOMAIN Administrator 2000000 "Domain Users" 2000001 ou=idmap,dc=samba,dc=example,dc=com 2>&1 | /data/samba/git/samba-push/selftest/filter-subunit --fail-on-empty --prefix="idmap.rfc2307." --suffix="(s3member_rfc2307)"
> > ERROR: Testsuite[idmap.rfc2307]
> > REASON: Exit code was 1
> > 
> > 
> > Does this pass for you, and what do you think the issue is?
> 
> Yes, this passes for me:
> 
> $ make test TESTS=idmap.rfc2307
> ...
> initialize_winbindd_cache: clearing cache and re-creating with version
> number 2
> [1/1 in 0s] idmap.rfc2307
> smbd child process 6677 exited with value 0
> nmbd child process 6673 exited with value 0
> winbindd child process 6674 exited with value 0
> samba: EOF on stdin - terminating
> 
> ALL OK (8 tests in 1 testsuites)
> 
> A summary with detailed information can be found in:
>   ./st/summary
> 'testonly' finished successfully (1m30.698s)
> 
> It almost looked like the idmap_rfc2307 module has not been loaded and
> the standard id mapping method returns different ids. Not sure why
> this would happen. I only tested this on my Laptop, i can try to find
> another machine to test again.

It looks like that would happen if I didn't run ./configure before
testing.  I've done that, and it looks better now. 

This is now in autobuild.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list