summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* param: move special charset handlers to lib/paramGarming Sam2014-05-072-56/+67
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: inline init_iconv into handle [dos] charsetGarming Sam2014-05-071-2/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: add getservicebyname to s3_helpersGarming Sam2014-05-074-3/+4
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use a single init_copymap method in lib/paramGarming Sam2014-05-072-24/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* docs: add test to docs.py to set parameters to some arbitrary valueGarming Sam2014-05-071-10/+93
| | | | | | | | This does not currently test enums. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* docs: change docs.py to test the setting of parameters to defaultsGarming Sam2014-05-071-0/+39
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: prevent an existing segmentation fault with setting [dos] charsetGarming Sam2014-05-071-2/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: move the declaration of the file_lists structure to a shared headerGarming Sam2014-05-073-13/+9
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use a single add_to_file_list methodGarming Sam2014-05-073-55/+15
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: change add_to_file_list to not use a loadparm contextGarming Sam2014-05-071-7/+7
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: change add_to_file_list to stop using global variablesGarming Sam2014-05-071-18/+18
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused lp_copy_serviceGarming Sam2014-05-071-16/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: consolidate handle_copy method between the two loadparmsGarming Sam2014-05-072-41/+18
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: rename getservicebyname to lpcfg_getservicebyname to avoid conflictsGarming Sam2014-05-071-4/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: avoid the use the global variable iServiceIndex in handle_copyGarming Sam2014-05-071-5/+5
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use a single copy_service function in lib/paramGarming Sam2014-05-073-85/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: duplicate the copy service in lib/param into source3 loadparmGarming Sam2014-05-072-18/+18
| | | | | | Change-Id: I9ddd9ba9c05ab226a335d261554dd1587f7e59fc Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/param: fix copy service to correctly free the memory used by P_LISTGarming Sam2014-05-071-0/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: improve copy_service to use the correct talloc parentsGarming Sam2014-05-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused init_serviceGarming Sam2014-05-071-12/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: remove the double initialization in add_a_serviceGarming Sam2014-05-071-6/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove instance of lp_parm_ptr to be consistent with lib/paramGarming Sam2014-05-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: attempt to fix up some const warningsGarming Sam2014-05-071-11/+11
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: remove some const warnings from using listsGarming Sam2014-05-071-15/+16
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: remove duplicated copy service in lpcfg_add_a_serviceGarming Sam2014-05-071-17/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: make lib/param copy_service use set_param_optGarming Sam2014-05-071-27/+4
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: move set_param_opt to lib/paramGarming Sam2014-05-072-62/+57
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/109 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use correct memory contexts for parametric optionsGarming Sam2014-05-071-10/+15
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/107 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove lp_string_is_valid_booleanGarming Sam2014-05-072-10/+0
| | | | | | | | | | This call is never made in the code and should in fact crash if it was ever called with a valid boolean Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/106 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: consolidate handle_realm between the two loadparmsGarming Sam2014-05-072-25/+23
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/105 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: attempt to consolidate handle_logfile between the two loadparmsGarming Sam2014-05-072-12/+7
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/104 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: change assignment of lp_string in s3_helpers to be consistent with ↵Garming Sam2014-05-071-1/+1
| | | | | | | | | | the other functions Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/103 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: attempt to consolidate handle_debug_level between the two loadparmsGarming Sam2014-05-074-19/+9
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/102 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: allow special functions to be common across the two loadparmsGarming Sam2014-05-071-2/+8
| | | | | | | | | | | Currently, each of the functions are declared in both and redefined using macros when they are unused. This change should allow only a single function to exist. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/101 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: Add an lp_string_set functionGarming Sam2014-05-072-0/+5
| | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/100 Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:loadparm: fix intermediate string allocations to use tallocGarming Sam2014-05-071-16/+22
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: change the talloc context attached to globals structure in s3 ↵Garming Sam2014-05-071-1/+1
| | | | | | | | | | | | | | | loadparm to a pool With many allocations being made, with many empty strings in loadparm, it should be more effective to use a talloc pool instead of a normal talloc context. The numbers chosen are based around a simple testparm instance. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/157 Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove string_init and inline it into string_setGarming Sam2014-05-071-26/+12
| | | | | | | | | | | | In making this change, the special case has been removed for empty strings. The use of empty strings causes various issues with trying to mix s4 and s3 code. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/156 Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:loadparm: change memory allocations to use tallocGarming Sam2014-05-071-161/+202
| | | | | | | | | (talloc memory paternity fix to handle_debug_list() and lp_parm_const_string_service() added by abartlet) Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unnecessary temporary service in handle copyGarming Sam2014-05-071-8/+3
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging: Nobody uses G_LOCK_RETRY anymoreVolker Lendecke2014-05-062-10/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue May 6 23:01:22 CEST 2014 on sn-devel-104
* build: find blkcnt_t size via arrayGustavo Zacarias2014-05-061-10/+12
| | | | | | | | | | | | | Using the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e find blkcnt_t size via an array so that it can be determined via build rather than running it. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue May 6 20:37:16 CEST 2014 on sn-devel-104
* build: tweak SIZEOF utmp->ut_lineGustavo Zacarias2014-05-061-1/+1
| | | | | | | | | | | Set the critical parameter of CHECK_SIZEOF utmp->ut_line to False since it's used to find out if utmp support should be enabled. This is necessary with the introduction of the cross-compile aware CHECK_SIZEOF. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* build: make wafsamba CHECK_SIZEOF cross-compile friendlyGustavo Zacarias2014-05-061-12/+16
| | | | | | | | | | | | | | | Use the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e We do the same array trick iteratively starting from 1 (byte) by powers of 2 up to 32. The new 'critical' option is used to make the invocation die or not according to each test. The default is True since normally it's expected to find a proper result and should error out if not. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* build: unify and fix endian testsGustavo Zacarias2014-05-062-58/+62
| | | | | | | | | | | | | Unify the endian tests out of lib/ccan/wscript into wafsamba since they're almost cross-compile friendly. While at it fix them to be so by moving the preprocessor directives out of main scope since that will fail. And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN defines separate because of different codebases. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* byteorder: do not assume PowerPC is big-endianDavid Disseldorp2014-05-061-4/+6
| | | | | | | | | | | byteorder.h currently uses reverse-indexing ASM instructions for little endian multi-byte storage/retrieval on PowerPC. With Power8 this is an incorrect assumption, as it can be big or little endian. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10590 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* dsdb: Do not permit nested event loops when in a transaction, use a nested ↵Andrew Bartlett2014-05-061-13/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | event context It is never safe to execute arbitary code inside a transaction - we need to get in and get out, not run other events for the rest of the server. This patch avoids that by creating a private event loop during transactions, so no unexpected operations fire, and returning the original one when we finish it. If an event fires during an LDB transaction, an unrelated operation can occur during the transaction, and if the transaction were to be cancelled, there would be a silent rollback (despite the client having been indicated success). Additionally, other processes could be called via IRPC that need to operate on the database but are locked out due to the ongoing transaction. Andrew Bartlett BUG: https://bugzilla.samba.org/show_bug.cgi?id=10582 Change-Id: I22322fc006e61d7291da17cdf6431416ebb7b30f 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): Tue May 6 13:36:20 CEST 2014 on sn-devel-104
* dsdb: Rename private_data to rootdse_private_data in rootdseAndrew Bartlett2014-05-061-8/+8
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10582 Change-Id: I349a2be67333ada86c19cd6d2ed283cd5bbeb2aa Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Minor typo fix in source3/wscript.Jose A. Rivera2014-05-051-1/+1
| | | | | | | | | Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon May 5 22:41:19 CEST 2014 on sn-devel-104
* Fix an empty if statement.Jose A. Rivera2014-05-051-1/+1
| | | | | | | | | | Primarily following the precedent set by other uses of composite_is_ok(), but also making sure nothing tries to use c after this point if it is in fact not ok. Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>