standalone build of ldb didn't support -k switch nor -U
Jelmer Vernooij
jelmer at samba.org
Mon Feb 13 05:11:03 MST 2012
On Sun, Feb 12, 2012 at 08:53:18PM -0800, Matthieu Patou wrote:
> On 02/12/2012 02:24 PM, Andrew Bartlett wrote:
> >On Sun, 2012-02-12 at 14:19 -0800, Matthieu Patou wrote:
> >>Hello,
> >>
> >>I just discovered today that building ldb as a system library means that
> >>ldb* tools won't support a lot of the "standard" command line options
> >>like -U or -k.
> >>
> >>I guess it's because we don't include
> >>source4/lib/cmdline/popt_credentials.c in the build, maybe worth having
> >>a couple of options still if build in standalone mode no ?
> >The idea (perhaps there are bugs) is that the standalone build of ldb
> >does not make network connections, unless it finds the Samba modules
> >during startup, which then loads the popt stuff.
> Ok fair.
> But for the moment due to symbols mismatch it's not really working:
>
> open("/usr/local/samba/lib/ldb//ldbsamba_extensions.so", O_RDONLY) = 3
> open("/usr/local/samba/lib/libcmdline-credentials.so", O_RDONLY) =
> -1 ENOENT (No such file or directory)
> open("/usr/local/samba/lib/private/libcmdline-credentials.so", O_RDONLY) = 3
> write(2, "ldb: unable to dlopen /usr/local"..., 230ldb: unable to
> dlopen /usr/local/samba/lib/ldb//ldbsamba_extensions.so :
> /usr/local/systemsamba/lib/ldb/libpopt.so: version
> `SAMBA_4.0.0ALPHA18_GIT_567F05E' not found (required by
> /usr/local/samba/lib/ldb//ldbsamba_extensions.so)
>
> Then the output is:
> You must supply a url with -H or with $LDB_URL
> Usage: ldbsearch <options> <expression> <attrs...>
> Usage: [OPTION...]
> -H, --url=URL database URL
> -b, --basedn=DN base DN
> -e, --editor=PROGRAM external editor
> -s, --scope=SCOPE search scope
> -v, --verbose increase verbosity
> --trace enable tracing
> -i, --interactive input from stdin
> -r, --recursive recursive delete
> --modules-path=PATH modules path
> --num-searches=INT number of test searches
> --num-records=INT number of test records
> -a, --all (|(objectClass=*)(distinguishedName=*))
> --nosync non-synchronous transactions
> -S, --sorted sort attributes
> -o=OPTION ldb_connect option
> --controls=STRING controls
> --show-binary display binary LDIF
> --paged use a paged search
> --show-deleted show deleted objects
> --show-recycled show recycled objects
> --show-deactivated-link show deactivated links
> --reveal reveal ldb internals
> --relax pass relax control
> --cross-ncs search across NC boundaries
> --extended-dn show extended DNs
>
> Help options:
> -?, --help Show this help message
> --usage Display brief usage message
Have you tried using the system popt and building in replace and ccan?
This seems to work for me. Having multiple Samba libraries
installations that ship their own copies of private libraries seems to
be the thing that's causing the breakage here.
Cheers,
Jelmer
More information about the samba-technical
mailing list