summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-02net: improve help text for "net idmap dump"Michael Adam1-1/+1
With idmap autorid "dump ID mappings" is not precise enough any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add a comment explaining idmap_autorid_saveconfig()Michael Adam1-0/+7
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add a comment explaining idmap_autorid_loadconfig()Michael Adam1-0/+3
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add a comment explaining idmap_autorid_db_init()Michael Adam1-0/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add a comment explaining idmap_autorid_init_hwm()Michael Adam1-0/+4
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add a comment explaining idmap_autorid_get_domainrange()Michael Adam1-0/+7
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: Don't use db as a temporary talloc context.Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: improve two debug messages by printing NT error codesMichael Adam1-3/+3
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: fix a debug message in idmap_autorid_addrange()Michael Adam1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: for clarity, add a wrapper idmap_autorid_acquire_range() to ↵Michael Adam1-1/+7
idmap_autorid_addrange() This one calls into the HWM bumping acquire code path. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add new function idmap_autorid_setrange()Michael Adam2-0/+26
This allows to directly set a range for a domsid#index pair. It fails if a stored range is found which is different from the requested one. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: factor out domain range adding code into a separate functionMichael Adam1-23/+117
This also adds a new mode to the new idmap_autorid_addrange() function that allows to set a provided range if the range is available, instead of the original only mode of automatically allocating a new range by incrementing the HWM counter. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: add idmap_autorid_getrange()Michael Adam2-0/+41
Wrapper to idmap_autorid_getrange_int(). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: improve a debug message in idmap_autorid_getrange_int()Michael Adam1-1/+2
Add output of status code. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: factor out domain range fetching part from ↵Atul Kulkarni1-20/+38
idmap_autorid_get_domainrange() Fatored out read-only function idmap_autorid_getrange() will be used elsewhere. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: Use fstr_sprintf in idmap_autorid_build_keystr()Volker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-02idmap_autorid: factor building of the keystr into a functionMichael Adam1-12/+20
to avoid code duplication. Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: remove fstring keystr from autorid_range_configAtul Kulkarni2-8/+16
This is just used to change the behaviour of the function. Making it more suitable to be used at other places. Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: remove autorid_global_config member from autorid_range_configAtul Kulkarni3-15/+17
global config is not part of range config. By removing this, autorid_range_config becomes more suitable for using it elsewhere. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: improve idmap_autorid_saveconfig() by adding a talloc stackframeMichael Adam1-9/+8
Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02idmap_autorid: move the checks from idmap_autorid_initialize to ↵Atul Kulkarni2-56/+61
idmap_autorid_saveconfig() Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: change idmap_autorid_loadconfig() to return NTSTATUSMichael Adam3-10/+24
for better error propagation. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: refactor idmap_autorid_parse_configstr() out of ↵Michael Adam2-11/+32
idmap_autorid_loadconfig() This will be used for other purposes as well. Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: rename TALLOC_CTX argument of idmap_autorid_loadconfig() to ↵Michael Adam1-3/+3
mem_ctx Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: refactor idmap_autorid_loadconfig to use ↵Michael Adam1-6/+3
idmap_config_getconfigstr Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid_tdb: add idmap_autorid_getconfigstr()Michael Adam2-0/+60
Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: extract common code to separate fileAtul Kulkarni4-278/+354
This is in preparation of adding "net idmap autorid" functionality. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: remove the ignore_builtin bool from the global_config structMichael Adam1-4/+5
The ignore_builtin flag is used only to change the bahaviour of the daemon code, not in the database. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: add path, and db parameters to idmap_autorid_db_init()Atul Kulkarni1-12/+14
In preparation of calling this from net for different dbs. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: add a db_context argument to idmap_autorid_init_hwm()Michael Adam1-7/+7
Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: add a db_context argument to idmap_autorid_saveconfig()Michael Adam1-4/+4
Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: add a db_context argument to idmap_autorid_loadconfig()Michael Adam1-3/+4
Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-01idmap_autorid: add a db_context argument to idmap_autorid_get_domainrange()Michael Adam1-5/+7
Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-27Stop use after freeAlistair Leslie-Hughes1-1/+5
Fixes bug #10087 Thanks to Man Min Yan for their analysis and providing a solution to the issue. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 27 14:29:46 CEST 2013 on sn-devel-104
2013-09-26dsdb: Convert the full string from UTF16 to UTF8, including embedded NULLsAndrew Bartlett1-1/+1
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077 Note that this doesn't fix the userParameters problem completely, but it doesn't truncate the userParameters value anymore. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Sep 26 22:05:12 CEST 2013 on sn-devel-104
2013-09-26s4-openldap: Restored openldap-related options to the provision scriptNadezhda Ivanova4-18/+54
At the moment they are only available if TEST_LDAP=yes to avoid accidental use as the openldap backend is still failing some tests Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Thu Sep 26 07:31:05 CEST 2013 on sn-devel-104
2013-09-25build: get rid of vars=locals() in source3/lib/netapi/examples/wscript_buildMichael Adam1-2/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Sep 25 00:51:31 CEST 2013 on sn-devel-104
2013-09-24build: get rid of vars=locals() in source3/modules/wscript_buildMichael Adam1-2/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source variables and vars=locals() in ↵Michael Adam1-68/+52
source3/rpc_server/wscript_build Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source strings from source3/passdb/wscript_buildMichael Adam1-9/+4
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source variables and vars=locals() in ↵Michael Adam1-12/+5
source3/libgpo/gpext/wscript_build Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of vars=locals() in source3/auth/wscript_buildMichael Adam1-4/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source-variables in source3/auth/wscript_buildMichael Adam1-20/+11
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source file variables in source3/modules/wscript_buildMichael Adam1-116/+59
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24dbcheck: Add back the elements that were wrongly removed from CN=Deleted ObjectsAndrew Bartlett1-0/+66
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
2013-09-24pydsdb: Raise a more useful exception when dsdb_wellknown_dn fails.Andrew Bartlett1-0/+5
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-24pydsdb: Give KeyError when we fail a schema lookup in pythonAndrew Bartlett1-8/+8
This allows sensible exception handling. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-24dbcheck: Ensure to always increase the error_countAndrew Bartlett1-0/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-09-24libsmbconf:registry: add "state directory" to the list of forbidden parametersMichael Adam1-0/+1
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>
2013-09-24selftest: include "state directory" in invalid parameters in registry ↵Michael Adam1-0/+1
roundtrip test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>