metze/samba/wip.git
10 years agoRevert "ldb/sample_module: don't write to const memory" master4-mdw
Stefan Metzmacher [Wed, 11 Sep 2013 11:28:02 +0000 (13:28 +0200)]
Revert "ldb/sample_module: don't write to const memory"

This reverts commit 121e51206c19df012766e9085a49c090b6e05490.

10 years agoFAILS ldb/sample_module: don't write to const memory
Stefan Metzmacher [Wed, 11 Sep 2013 06:31:43 +0000 (08:31 +0200)]
FAILS ldb/sample_module: don't write to const memory

req->op.add.message is the callers memory and declared as const.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
FAILS: TDB_NO_FSYNC=1 buildnice bin/timelimit 180 make -j test TESTS=ldb.base

10 years agos4:sam.py - "servicePrincipalName" - test for case-insensitiveness
Matthias Dieter Wallnöfer [Thu, 24 May 2012 20:27:46 +0000 (22:27 +0200)]
s4:sam.py - "servicePrincipalName" - test for case-insensitiveness

After the LDB TDB changes regarding the use of schema comparison
functions rather than bitwise checks this finally works as it should.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8929

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoLDB:test-generic.sh - fix smaller/greater comparison tests
Matthias Dieter Wallnöfer [Tue, 4 Sep 2012 16:27:48 +0000 (18:27 +0200)]
LDB:test-generic.sh - fix smaller/greater comparison tests

Result has been ignored.

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolib/ldb: switch ldb_tdb to schema-based attribute comparison
Andrew Bartlett [Fri, 11 May 2012 08:00:29 +0000 (10:00 +0200)]
lib/ldb: switch ldb_tdb to schema-based attribute comparison

Based on an earlier patch by Matthias Dieter Wallnöfer <mdw@samba.org>

This is necessary to perform correct schema enforcement, becuase we
must enforce uniquiness based on the schema matching rules.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=7485
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8929

Andrew Bartlett

Small fix by Matthias Dieter Wallnöfer <mdw@samba.org>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolib/ldb: add schema based ldb_val comparison and ldb_msg_element search routines
Andrew Bartlett [Fri, 11 May 2012 07:52:18 +0000 (09:52 +0200)]
lib/ldb: add schema based ldb_val comparison and ldb_msg_element search routines

Based on an earlier patch by Matthias Dieter Wallnöfer <mdw@samba.org>

This is necessary to perform correct schema enforcement, because we
must enforce uniquiness based on the schema matching rules.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=7485
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8929

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agobla...
Stefan Metzmacher [Wed, 25 Sep 2013 22:10:29 +0000 (00:10 +0200)]
bla...

10 years agolib/ldb/common/ldb_msg.c
Stefan Metzmacher [Wed, 25 Sep 2013 09:51:32 +0000 (11:51 +0200)]
lib/ldb/common/ldb_msg.c

10 years agotests
Stefan Metzmacher [Wed, 25 Sep 2013 09:34:46 +0000 (11:34 +0200)]
tests

10 years ago return LDB_ERR_OTHER;// INVALID_ATTRIBUTE_SYNTAX;
Stefan Metzmacher [Wed, 25 Sep 2013 09:34:23 +0000 (11:34 +0200)]
 return LDB_ERR_OTHER;// INVALID_ATTRIBUTE_SYNTAX;

10 years agoTODO; test_permisive_modify
Stefan Metzmacher [Mon, 23 Sep 2013 07:50:37 +0000 (09:50 +0200)]
TODO; test_permisive_modify

10 years agoWHY??? Revert "ltdb_modify_internal..."
Stefan Metzmacher [Wed, 25 Sep 2013 08:50:17 +0000 (10:50 +0200)]
WHY??? Revert "ltdb_modify_internal..."

This reverts commit fa0d28c34a62ac3b4e512fef3aa329b3951c20e7.

10 years agoltdb_modify_internal...
Stefan Metzmacher [Sun, 22 Sep 2013 21:39:49 +0000 (23:39 +0200)]
ltdb_modify_internal...

10 years agoLDB:ldb_tdb.c - also special entries should be checked for duplicate values
Matthias Dieter Wallnöfer [Tue, 4 Sep 2012 17:02:02 +0000 (19:02 +0200)]
LDB:ldb_tdb.c - also special entries should be checked for duplicate values

The exclusion can be removed since the special attribute (@...) handling has
been fixed.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8929

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoldb/tdb: make sure we use the default syntax for all attributes of dn: @ATTRIBUTES
Stefan Metzmacher [Wed, 11 Sep 2013 06:33:14 +0000 (08:33 +0200)]
ldb/tdb: make sure we use the default syntax for all attributes of dn: @ATTRIBUTES

The values are already checked in ltdb_check_special_dn() which is called
before calling into ltdb_add_internal/ltdb_modify_internal.

So ltdb_add_internal/ltdb_modify_internal should not verify it again
and get the default syntax by forcing "@" as attribute name
for ldb_schema_attribute_by_name().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoldb/tdb: let the caller pass ldb_schema_attribute to msg_delete_element()
Stefan Metzmacher [Tue, 10 Sep 2013 09:02:43 +0000 (11:02 +0200)]
ldb/tdb: let the caller pass ldb_schema_attribute to msg_delete_element()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoLDB:ldb_attributes.c - handle special attributes (@...) always in the default syntax
Matthias Dieter Wallnöfer [Tue, 4 Sep 2012 20:25:04 +0000 (22:25 +0200)]
LDB:ldb_attributes.c - handle special attributes (@...) always in the default syntax

This is a requirement for correct schema syntax comparison.

"lib/ldb/tests/test-tdb-features.sh" demostrates this when adding index
entries and the default syntax is set to INTEGER.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8929

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoldb/tdb: avoid casting TDB_DATA to struct ldb_val
Stefan Metzmacher [Wed, 11 Sep 2013 06:30:40 +0000 (08:30 +0200)]
ldb/tdb: avoid casting TDB_DATA to struct ldb_val

The structures are identical, but this generates compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoldb: add some const to ldb_msg_find_val()
Stefan Metzmacher [Wed, 11 Sep 2013 07:25:30 +0000 (09:25 +0200)]
ldb: add some const to ldb_msg_find_val()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoldb: let ldb_modules_list_from_string() return 'char **'
Stefan Metzmacher [Tue, 10 Sep 2013 10:55:37 +0000 (12:55 +0200)]
ldb: let ldb_modules_list_from_string() return 'char **'

The caller provides a memory context and owns the returned
list.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoldb: add more const to ldb_module_load_list()
Stefan Metzmacher [Tue, 10 Sep 2013 10:55:10 +0000 (12:55 +0200)]
ldb: add more const to ldb_module_load_list()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:samba_dsdb: fix 'const char **' vs. 'char **' compiler warnings
Stefan Metzmacher [Tue, 10 Sep 2013 10:51:52 +0000 (12:51 +0200)]
s4:samba_dsdb: fix 'const char **' vs. 'char **' compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:dsdb:objectclass_attrs: return based on the validate_ldb() return value.
Stefan Metzmacher [Wed, 25 Sep 2013 08:09:41 +0000 (10:09 +0200)]
s4:dsdb:objectclass_attrs: return based on the validate_ldb() return value.

WERR_DS_INVALID_ATTRIBUTE_SYNTAX and WERR_DS_CONSTRAINT_VIOLATION
are the important ones, which need to be mapped to
LDB_ERR_INVALID_ATTRIBUTE_SYNTAX and LDB_ERR_CONSTRAINT_VIOLATION.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4:dsdb/schema: enforce rangeLower/nextUpper with WERR_DS_CONSTRAINT_VIOLATION
Stefan Metzmacher [Wed, 25 Sep 2013 08:03:03 +0000 (10:03 +0200)]
s4:dsdb/schema: enforce rangeLower/nextUpper with WERR_DS_CONSTRAINT_VIOLATION

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoSQUASH NOT FIX s4:dsdb/test/ldap: add more test_attribute_ranges() combinations
Stefan Metzmacher [Wed, 25 Sep 2013 07:15:01 +0000 (09:15 +0200)]
SQUASH NOT FIX s4:dsdb/test/ldap: add more test_attribute_ranges() combinations

10 years agos4:dsdb/objectclass_attr:
Stefan Metzmacher [Wed, 25 Sep 2013 06:46:49 +0000 (08:46 +0200)]
s4:dsdb/objectclass_attr:

10 years agos4:dsdb/test/ldap: add more test_attribute_ranges() combinations
Stefan Metzmacher [Wed, 25 Sep 2013 06:42:47 +0000 (08:42 +0200)]
s4:dsdb/test/ldap: add more test_attribute_ranges() combinations

The 'appliesTo' attribute is very good for testing rangeLower/rangeUpper.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agodsdb/tests/ldap: test_attribute_ranges: test the upper range of the 'sn' attribute
Stefan Metzmacher [Mon, 23 Sep 2013 01:40:45 +0000 (03:40 +0200)]
dsdb/tests/ldap: test_attribute_ranges: test the upper range of the 'sn' attribute

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoldb:rdn_name: reject 'distinguishedName' depending of the MOD flags
Stefan Metzmacher [Tue, 24 Sep 2013 23:30:23 +0000 (01:30 +0200)]
ldb:rdn_name: reject 'distinguishedName' depending of the MOD flags

This is what Windows 2008 R2 returns:

LDB_MOD_ADD     => LDB_ERR_UNWILLING_TO_PERFORM
LDB_MOD_REPLACE => LDB_ERR_CONSTRAINT_VIOLATION
LDB_MOD_DEL     => LDB_ERR_UNWILLING_TO_PERFORM

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agodsdb/tests/ldap: fix test_distinguished_name against w2k8r2
Stefan Metzmacher [Mon, 23 Sep 2013 01:39:58 +0000 (03:39 +0200)]
dsdb/tests/ldap: fix test_distinguished_name against w2k8r2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agos4:dsdb/rootdse: report 'dnsHostName' instead of 'dNSHostName'
Stefan Metzmacher [Tue, 24 Sep 2013 22:49:19 +0000 (00:49 +0200)]
s4:dsdb/rootdse: report 'dnsHostName' instead of 'dNSHostName'

The attribute on the RootDSE object is called 'dnsHostName'
instead of 'dNSHostName' (which is used in the schema and on
all other directory objects).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agodsdb/tests/ldap: fix test_ldapServiceName against w2k8r2
Stefan Metzmacher [Sun, 22 Sep 2013 21:40:12 +0000 (23:40 +0200)]
dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agodbcheck: Add back the elements that were wrongly removed from CN=Deleted Objects
Andrew Bartlett [Mon, 23 Sep 2013 02:26:50 +0000 (19:26 -0700)]
dbcheck: Add back the elements that were wrongly removed from CN=Deleted Objects

This is the final part of the fix for the issue in Samba 4.1
pre-release tree where we would wrongly delete the Deleted Objects
container during a join.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep 24 09:31:37 CEST 2013 on sn-devel-104

10 years agopydsdb: Raise a more useful exception when dsdb_wellknown_dn fails.
Andrew Bartlett [Mon, 23 Sep 2013 02:26:10 +0000 (19:26 -0700)]
pydsdb: Raise a more useful exception when dsdb_wellknown_dn fails.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agopydsdb: Give KeyError when we fail a schema lookup in python
Andrew Bartlett [Mon, 23 Sep 2013 00:45:01 +0000 (17:45 -0700)]
pydsdb: Give KeyError when we fail a schema lookup in python

This allows sensible exception handling.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agodbcheck: Ensure to always increase the error_count
Andrew Bartlett [Mon, 23 Sep 2013 00:07:22 +0000 (17:07 -0700)]
dbcheck: Ensure to always increase the error_count

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agolibsmbconf:registry: add "state directory" to the list of forbidden parameters
Michael Adam [Tue, 17 Sep 2013 17:10:48 +0000 (19:10 +0200)]
libsmbconf:registry: add "state directory" to the list of forbidden parameters

At the time when the registry configuration was introduced,
the registry database file was placed in the "lock directory".
So the "lock directory" was added to the list of parameters
that may not be changed in the registry configuration
(because the next config reload would then load a different
 registry and drop all the original seetings).

Later, "state directory" and "cache directory" were introduced,
both defaulting to "lock directory". And the registry's location
was changed to "state directory".

It slipped my attention that the forbidden parameters for the
should have been adapted at the time.

So this patch adds "state directory" to the list.
It keeps the lock directory, to catch the case
where the state directory is not explicitly set, hence
defaulting to the "lock directory".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: include "state directory" in invalid parameters in registry roundtrip test
Michael Adam [Sun, 22 Sep 2013 01:03:41 +0000 (03:03 +0200)]
selftest: include "state directory" in invalid parameters in registry roundtrip test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: add "state directory" to the forbidden parameters test in net conf
Michael Adam [Sat, 21 Sep 2013 20:38:31 +0000 (22:38 +0200)]
selftest: add "state directory" to the forbidden parameters test in net conf

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: add regression test for setting invalid parameters in registry config via...
Michael Adam [Sat, 21 Sep 2013 20:34:31 +0000 (22:34 +0200)]
selftest: add regression test for setting invalid parameters in registry config via "net [rpc] conf"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: update SED_INVALID_PARAMS in the registry.roundtrip test
Michael Adam [Sun, 22 Sep 2013 01:06:12 +0000 (03:06 +0200)]
selftest: update SED_INVALID_PARAMS in the registry.roundtrip test

and add an explaining comment.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoselftest: remove unused variables (copy'n'paste...) from test_net_conf.sh
Michael Adam [Sun, 22 Sep 2013 01:02:51 +0000 (03:02 +0200)]
selftest: remove unused variables (copy'n'paste...) from test_net_conf.sh

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:net conf: add the same parameter checks to "setparm" as in "net rpc conf".
Michael Adam [Sun, 22 Sep 2013 08:00:55 +0000 (10:00 +0200)]
s3:net conf: add the same parameter checks to "setparm" as in "net rpc conf".

In "net rpc conf" these checks are necessary, since the that command
uses the plain rpc-registry interface at this moment, and so unfortunately
it has to duplicate the checks from the smbconf library.

Since "net conf" uses the registry, these checks are not necessary in
this command. I add them nonetheless to make the output more similar
to "net rpc conf". It is also a little more user friendy than just
printing "INVALID_PARAMETER" as handed back from libsmbconf.

Implement these checks by calling the new net_conf_param_valid() function.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:net: check for GLOBAL_NAME net_conf_param_valid()
Michael Adam [Tue, 24 Sep 2013 04:43:03 +0000 (06:43 +0200)]
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>
10 years agos3:net rpc conf: factor validation of parameter out for re-use.
Michael Adam [Tue, 24 Sep 2013 04:38:09 +0000 (06:38 +0200)]
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>
10 years agos3:net rpc conf: rename canon_valname->canon_param_name for clarity in setparm.
Michael Adam [Sun, 22 Sep 2013 07:59:19 +0000 (09:59 +0200)]
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>
10 years agos3:net rpc conf: setparm: introduce variables service_name, param_name, valstr for...
Michael Adam [Sun, 22 Sep 2013 07:11:55 +0000 (09:11 +0200)]
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>
10 years agos3:net rpc conf: reorganize the validity check and canonicalization of the input...
Michael Adam [Sun, 22 Sep 2013 06:26:47 +0000 (08:26 +0200)]
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>
10 years agolibsmbconf:registry: clarify the appearance of "includes" in forbidden_names
Michael Adam [Sun, 22 Sep 2013 06:54:30 +0000 (08:54 +0200)]
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>
10 years agolibsmbconf:registry: reorganize the validity check and canonicalization of the input...
Michael Adam [Sun, 22 Sep 2013 06:47:14 +0000 (08:47 +0200)]
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>
10 years agos3:net rpc conf: print the provided parameter name on error, not the canonicalized one
Michael Adam [Sun, 22 Sep 2013 05:51:05 +0000 (07:51 +0200)]
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>
10 years agos3:net rpc conf: remove the (now) unused rpc_conf_reg_valname_forbidden()
Michael Adam [Sun, 22 Sep 2013 01:45:28 +0000 (03:45 +0200)]
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>
10 years agos3:net rpc conf: use the published smbconf_reg_parameter_is_valid()
Michael Adam [Sun, 22 Sep 2013 01:44:58 +0000 (03:44 +0200)]
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>
10 years agolibsmbconf:registry: publish smbconf_reg_parameter_is_valid()
Michael Adam [Sun, 22 Sep 2013 08:27:38 +0000 (10:27 +0200)]
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>
10 years agolibsmbconf:registry: rework smbconf_reg_parameter_forbidden(), renaming it.
Michael Adam [Sun, 22 Sep 2013 01:39:48 +0000 (03:39 +0200)]
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>
10 years agoFix DN RDN case in partition names
Howard Chu [Thu, 19 Sep 2013 17:41:16 +0000 (10:41 -0700)]
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

10 years agoFix entryCSN format
Howard Chu [Thu, 19 Sep 2013 17:41:02 +0000 (10:41 -0700)]
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>
10 years agos4-openldap: Remove use of talloc_reference in ldb_map_outbound.c
Nadezhda Ivanova [Wed, 18 Sep 2013 22:31:24 +0000 (15:31 -0700)]
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>
10 years agos4-openldap: Added an -H option to delegation script
Nadezhda Ivanova [Sun, 22 Sep 2013 18:24:57 +0000 (11:24 -0700)]
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>
10 years agoDrop paged-search from OpenLDAP stack
Howard Chu [Mon, 16 Sep 2013 21:12:42 +0000 (14:12 -0700)]
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>
10 years agoAdd LDB_MAP_RENDROP option
Howard Chu [Wed, 18 Sep 2013 23:50:34 +0000 (16:50 -0700)]
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>
10 years agoReturn a couple more attrs by default
Howard Chu [Thu, 19 Sep 2013 00:10:07 +0000 (17:10 -0700)]
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>
10 years agoCleanup start/stop code
Howard Chu [Thu, 19 Sep 2013 12:52:59 +0000 (05:52 -0700)]
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>
10 years agopidl: Generate wireshark that conforms to the rules of Wireshark project
Matthieu Patou [Mon, 23 Sep 2013 05:23:51 +0000 (22:23 -0700)]
pidl: Generate wireshark that conforms to the rules of Wireshark project

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 24 02:04:05 CEST 2013 on sn-devel-104

10 years agopidl: Generate NDR64/NDR32 aware code for the wireshark dissectors
Matthieu Patou [Mon, 23 Sep 2013 05:10:10 +0000 (22:10 -0700)]
pidl: Generate NDR64/NDR32 aware code for the wireshark dissectors

Signed-off-by: Matthieu Patou <mat@matws.net>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoidl: fix frsrpc idl with NDR64 fields
Matthieu Patou [Mon, 23 Sep 2013 02:50:10 +0000 (19:50 -0700)]
idl: fix frsrpc idl with NDR64 fields

Signed-off-by: Matthieu Patou <mat@matws.net>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoidl: remove duplicate flag
Matthieu Patou [Mon, 23 Sep 2013 01:29:56 +0000 (18:29 -0700)]
idl: remove duplicate flag

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agofrstrans.idl: add flag(NDR_PAHEX) to frstrans_BytePipe
Stefan Metzmacher [Mon, 23 Sep 2013 06:09:37 +0000 (08:09 +0200)]
frstrans.idl: add flag(NDR_PAHEX) to frstrans_BytePipe

That way we get hexdump -C style output for the content of the pipe chunks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
10 years agodrsuapi.idl: change the range for attribute values to 26214400 bytes.
Stefan Metzmacher [Mon, 23 Sep 2013 06:05:41 +0000 (08:05 +0200)]
drsuapi.idl: change the range for attribute values to 26214400 bytes.

This matches the IDL from [MS-DRSR].

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
10 years agolibrpc/ndr: make use of ndr_dump_data() in ndr_print_array_uint8()
Stefan Metzmacher [Mon, 23 Sep 2013 05:39:43 +0000 (07:39 +0200)]
librpc/ndr: make use of ndr_dump_data() in ndr_print_array_uint8()

It's much easier to look at hexdump -C style output than
a few thousand lines with 1 byte each.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
10 years agolibrpc/ndr: make ndr_pull/push_DATA_BLOB NDR64 aware
Stefan Metzmacher [Mon, 23 Sep 2013 05:20:00 +0000 (07:20 +0200)]
librpc/ndr: make ndr_pull/push_DATA_BLOB NDR64 aware

Pair-Programmed-With: Matthieu Patou <mat@matws.net>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
10 years agos4:torture:ldap: Fix misleading output
Howard Chu [Wed, 18 Sep 2013 22:29:38 +0000 (15:29 -0700)]
s4:torture:ldap: Fix misleading output

Looks like an errant copy/paste from the Abandon test.

Signed-off-by: Howard Chu <hyc@symas.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Sep 23 22:47:50 CEST 2013 on sn-devel-104

10 years agos3:modules: vfs_afsacl has the afs_syscall prototype via proto.h
Michael Adam [Mon, 23 Sep 2013 17:38:12 +0000 (19:38 +0200)]
s3:modules: vfs_afsacl has the afs_syscall prototype via proto.h

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos3:include: remove duplicate prototypes from afs functions from proto.h
Michael Adam [Mon, 23 Sep 2013 00:37:16 +0000 (02:37 +0200)]
s3:include: remove duplicate prototypes from afs functions from proto.h

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoafs: implement afs_syscall() always, returning -1 if FAKE_KASERVER is not defined.
Michael Adam [Mon, 23 Sep 2013 00:36:28 +0000 (02:36 +0200)]
afs: implement afs_syscall() always, returning -1 if FAKE_KASERVER is not defined.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agoafs: format afs_syscall() properly
Michael Adam [Mon, 23 Sep 2013 00:35:58 +0000 (02:35 +0200)]
afs: format afs_syscall() properly

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: remove remaining occurrences of vars=locals() of source3/wscript_build
Michael Adam [Mon, 23 Sep 2013 08:11:18 +0000 (10:11 +0200)]
build: remove remaining occurrences of vars=locals() of source3/wscript_build

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary split_tokens directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:06:38 +0000 (10:06 +0200)]
build: list source of binary split_tokens directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of dbwrap_torture directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:05:43 +0000 (10:05 +0200)]
build: list source of dbwrap_torture directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary dbwrap_tool directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:04:53 +0000 (10:04 +0200)]
build: list source of binary dbwrap_tool directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary rpc_open_tcp directly in dev, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:04:04 +0000 (10:04 +0200)]
build: list source of binary rpc_open_tcp directly in dev, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary vlp directly in dev, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:03:08 +0000 (10:03 +0200)]
build: list source of binary vlp directly in dev, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of binary ntlm_auth directly in dev, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:02:11 +0000 (10:02 +0200)]
build: list sources of binary ntlm_auth directly in dev, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of library nss_wins directly in dev
Michael Adam [Mon, 23 Sep 2013 08:01:07 +0000 (10:01 +0200)]
build: list sources of library nss_wins directly in dev

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary smbfilter directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 08:00:21 +0000 (10:00 +0200)]
build: list source of binary smbfilter directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of binary debug2html directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:59:38 +0000 (09:59 +0200)]
build: list sources of binary debug2html directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary sharesec() directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:58:30 +0000 (09:58 +0200)]
build: list source of binary sharesec() directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary eventlogadm directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:57:41 +0000 (09:57 +0200)]
build: list source of binary eventlogadm directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary smbcquotas directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:56:53 +0000 (09:56 +0200)]
build: list source of binary smbcquotas directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary smbcacls directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:55:56 +0000 (09:55 +0200)]
build: list source of binary smbcacls directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary locktest2 directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:55:14 +0000 (09:55 +0200)]
build: list source of binary locktest2 directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary log2pcap directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:54:28 +0000 (09:54 +0200)]
build: list source of binary log2pcap directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of binary vfstest directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:53:43 +0000 (09:53 +0200)]
build: list sources of binary vfstest directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary pdbtest directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:52:44 +0000 (09:52 +0200)]
build: list source of binary pdbtest directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary msgtest direcly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:51:54 +0000 (09:51 +0200)]
build: list source of binary msgtest direcly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of smbtorture(3) directly in dev, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:50:57 +0000 (09:50 +0200)]
build: list sources of smbtorture(3) directly in dev, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary nmblookup directly in source, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:49:10 +0000 (09:49 +0200)]
build: list source of binary nmblookup directly in source, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list source of binary smbspool directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:48:26 +0000 (09:48 +0200)]
build: list source of binary smbspool directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of binary net directly in def, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:47:36 +0000 (09:47 +0200)]
build: list sources of binary net directly in def, remove vars=locals()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: list sources of subsys LIBNET_SAMSYNC directly in dev, remove vars=locals()
Michael Adam [Mon, 23 Sep 2013 07:44:25 +0000 (09:44 +0200)]
build: list sources of subsys LIBNET_SAMSYNC directly in dev, remove vars=locals()

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