Cleanup start/stop code

teardown was bailing out before stopping slapd.
Use fork/exec to start slapd, just like samba.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
Return a couple more attrs by default

Seems to want name and distinguishedName to always be returned.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
Add LDB_MAP_RENDROP option

Like LDB_MAP_RENAME, but drop the attribute if it occurs in an Add request.
Used for distinguishedName attribute, is read-only and generated but for
some bizarre reason AD allows it in an Add request.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
Drop paged-search from OpenLDAP stack

Unnecessary, waste of time

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
s4-openldap: Added an -H option to delegation script

Also calling delegation locally without credentials, as this is not really
necessary and causes selftest errors against the openldap backend.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4-openldap: Remove use of talloc_reference in ldb_map_outbound.c

Instead of referencing the values array of the element to the new element, copy them, to
avoid use of talloc_reference and remove a warning of talloc_steal with reference.
The issue is only relevant when openldap backend is used.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Fix entryCSN format

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
Fix DN RDN case in partition names

Move fix_dn from extended_dn_out.c to util.c

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>

Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Tue Sep 24 07:43:39 CEST 2013 on sn-devel-104
libsmbconf:registry: rework smbconf_reg_parameter_forbidden(), renaming it.

The logic is inverted, the lp_parameter_is_invalid call of
smbconf_reg_valname_valid() is included, and the function
is renamed to smbconf_reg_parameter_is_valid().

Use the new function everywhere in smbconf registry backend.
And remove corresponding reverse function smbconf_reg_valname_valid().

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libsmbconf:registry: publish smbconf_reg_parameter_is_valid()

So that this does not need to be duplicated..

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: use the published smbconf_reg_parameter_is_valid()

Instead of the duplicated rpc_conf_reg_valname_forbidden()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: remove the (now) unused rpc_conf_reg_valname_forbidden()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: print the provided parameter name on error, not the canonicalized one

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libsmbconf:registry: reorganize the validity check and canonicalization of the input in "setparm"

- first check that the name is an smbconf parameter
- then check that the parameter is allowed in the registry config
- then check that a global parameter is not to be set in a service section
- then canonicalize the parameter and value name, thereby checking that the
  value has valid format

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libsmbconf:registry: clarify the appearance of "includes" in forbidden_names

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: reorganize the validity check and canonicalization of the input in "setparm"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: setparm: introduce variables service_name, param_name, valstr for clarity

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: rename canon_valname->canon_param_name for clarity in setparm.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net rpc conf: factor validation of parameter out for re-use.

This goes into a new module net_conf_util to be shared
between net conf and net rpc conf.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s3:net: check for GLOBAL_NAME net_conf_param_valid()

instead of checking for literal "global"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>