summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLEDStefan Metzmacher2014-07-091-17/+20
| | | | | | | | | | | | | We should take the controls the caller provided when we search for existing objects. A search with a basedn of '<GUID=....>' should result in LDB_ERR_NO_SUCH_OBJECT is the object has isDeleted=TRUE. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting ↵Stefan Metzmacher2014-07-091-1/+1
| | | | | | | | | | | tombstone/deleted objects SHOW_RECYCLED implies SHOW_DELETED. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/schema_load: make error message more verboseStefan Metzmacher2014-07-091-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ctdb-daemon: Support per-node robust mutex featureAmitay Isaacs2014-07-094-1/+16
| | | | | | | | | | | | | | | | To enable TDB mutex support, set tunable TDBMutexEnabled=1. When databases are attached for the first time, attach flags must include TDB_MUTEX_LOCKING and TDBMutexEnabled must set to enable mutex support. However, when CTDB attaches databases internally for recovery, it will enable mutex support if TDBMutexEnabled is set. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Jul 9 06:45:17 CEST 2014 on sn-devel-104
* ctdb-daemon: Enable robust mutexes only if TDB_MUTEX_LOCKING is definedAmitay Isaacs2014-07-091-1/+11
| | | | | | | Runtime check for robust mutexes is performed just before opening local tdb. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-daemon: Allow flag TDB_MUTEX_LOCKING to pass into db_attachVolker Lendecke2014-07-091-5/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-daemon: Simplify code a bitAmitay Isaacs2014-07-091-1/+5
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-daemon: Use false instead of 0 for boolean argumentsAmitay Isaacs2014-07-091-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Use mutex instead of fcntl lock for echohandler coordinationChristof Schmitt2014-07-093-34/+173
| | | | | | | | | | | | | | This is based on a patch from Volker. When the system supports roboust mutexes, they will be used for the coordiations between worker and echohandler process. This avoids another aspect of the fcntl scalibility issue when handling many client connections. When mutexes are not available, the code falls back to the fcntl lock. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 9 00:56:50 CEST 2014 on sn-devel-104
* smbd: Avoid double-free in get_print_db_bynameVolker Lendecke2014-07-081-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Jul 8 22:27:03 CEST 2014 on sn-devel-104
* smbd: Factor out smbd_smb2_send_breakVolker Lendecke2014-07-081-22/+36
| | | | | | | | | | Most of this routine can be re-used for sending lease breaks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 8 19:54:09 CEST 2014 on sn-devel-104
* smbd: Rename smbd_smb2_send_oplock_break_state->buf to ->bodyVolker Lendecke2014-07-081-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: no "dyn" in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-6/+3
| | | | | | | | We don't need the assignment to state->vector[1+SMBD_SMB2_DYN_IOV_OFS], this is zero-initialized by talloc_zero Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make hdr a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-19/+20
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make tf a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-14/+15
| | | | | | | This actually saves a few bytes in .text. Maybe due to the struct assignments? Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make nbt_hdr a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-4/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-auth-krb: Fix talloc access after free in smb_krb5_update_keytabSamuel Cabrero2014-07-081-1/+6
| | | | | | | | | | Change-Id: Iaa168d520f124e0c43c7edd649318f0b8ee25020 Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date(master): Tue Jul 8 16:51:09 CEST 2014 on sn-devel-104
* ctdb-tests: Do not run ip command if running against local daemonsAmitay Isaacs2014-07-081-3/+6
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Jul 8 12:48:06 CEST 2014 on sn-devel-104
* ctdb-build: fix wscript formatting as per PEP8Amitay Isaacs2014-07-081-14/+24
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Create ctdb only ctagsAmitay Isaacs2014-07-082-2/+3
| | | | | | | | CTDB does not use auto-generated files, there is no need to configure to generate ctags. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Replace os.system with samba_utils.RUN_COMMANDAmitay Isaacs2014-07-081-5/+20
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-build: Check the return value of RUN_COMMANDAmitay Isaacs2014-07-081-3/+12
| | | | | | | | | RUN_COMMAND does not raise exceptions if the command fails, but returns non-zero status. Ensure that make terminates with non-zero status if RUN_COMMAND fails. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tests: Shutdown local daemons if the tests exit abnormallyAmitay Isaacs2014-07-081-6/+24
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Martin Schwenke <martin@meltin.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4: torture: Add a new lock test to show that the Samba SMB1 multi-lock ↵Jeremy Allison2014-07-081-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation is (currently) correct. Needed as there was a proposal to re-architect our multi-lock to dispense with lock order precedence, which isn't how Windows does it (unfortunately, as the new code would have been cleaner :-). Tested against the Win2k12 SMB1 implementation. This test is designed to show that lock precedence on the server is based on the order received, not on the ability to grant. For example: A blocked lock request containing 2 locks will be satified before a subsequent blocked lock request over one of the same regions, even if that region is then unlocked. E.g. (a) lock 100->109, 120->129 (granted) (b) lock 100->109, 120-129 (blocks) (c) lock 100->109 (blocks) (d) unlock 100->109 lock (c) will not be granted as lock (b) will take precedence. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 8 10:16:59 CEST 2014 on sn-devel-104
* s3: VFS modules: Ignore EPERM errors on [f]chmod in crossrename module.Jeremy Allison2014-07-081-2/+4
| | | | | | | This is already done for [f]chown errors. Fix from CurlyMo <curlymoo1@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: Amend docs.py test to check dumping of flagged parametersGarming Sam2014-07-081-1/+70
| | | | | | | | | | | | | | | | | This test uses an empty smb.conf file to check if the resulting output from testparm is empty. It also sets a parameter as default in an smb.conf file and then sets the option on the command line to ensure they are displayed correctly. Change-Id: I48f05b6e3c9e5cd856e89b196e00ae35eb93bf9f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jul 8 01:57:59 CEST 2014 on sn-devel-104
* param: remove idmap parameters as special cases in docs.pyGarming Sam2014-07-071-3/+0
| | | | | | | Change-Id: Ie2395ddbe9e055b9972fd859615a022d9f675014 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: change snum parameter in special functions to a loadparm_service pointerGarming Sam2014-07-074-45/+57
| | | | | | | | | | | | | | Using either an snum or the current service for special functions depending where it was called is unnecessary and complicates the process of handling them generically. idmap parameters now call lpcfg_do_parameter_parametric and are now set like normal. Change-Id: I3eca89791274280f9d3c7b987fbd790c16ec7981 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* s3:param: pass down lp_ctx in handle includeGarming Sam2014-07-071-1/+1
| | | | | | | | | | Currently the lp_ctx will never actually be used as it will still go through the current s3 code. Change-Id: Iff236aea79b2294deb8faf175c7425d075a0f4c4 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* lib/param: rename do_parameter to lpcfg_do_parameterGarming Sam2014-07-071-5/+3
| | | | | | | | | This should be used to allow it to be called from s3 code. Change-Id: I2f2d5526cf11a1ad78ca6ff7cb5c18fa25a98c76 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: handle smb_ports as a special handlerGarming Sam2014-07-073-3/+45
| | | | | | | | | | Avoids some problems with using str_list_make and str_list_make_v3 and tries to verify if the ports assignment is reasonable Change-Id: I441c4cca605c7548a5023b65994004fbac57d2df Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: Use set_variable instead of set_variable_helper in lp_do_parameterGarming Sam2014-07-072-44/+19
| | | | | | | | | | | | | This extends the usage of the temporary s3 context in lp_do_parameter to beyond the special functions. At least for now, this will be necessary for sorting out the differences between the do_parameter code. Change-Id: Iac380d11a927e466ab1a56d34cebe343c3608707 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: add failure case for loadparm_init_s3Garming Sam2014-07-071-0/+6
| | | | | | | | | It allocates memory, so it should be possible for it to fail. Change-Id: Ib24f9718fb88790de23b78435866b9e79fe8c705 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: store the flags_list in the s3 lp context used for specialGarming Sam2014-07-071-0/+1
| | | | | | | | | Special function needs the flag list. Change-Id: I3c2f118704026913021e4399e89cc3583de9a743 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: mark non default options using flags in s3Garming Sam2014-07-071-3/+25
| | | | | | | | | | This change allows lib/param code to see which s3 parameters are currently set to defaults. Change-Id: Ic25b3f8e792a6d72705a7e5d7159ac8f87e18512 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: fix FLAG_CMDLINE to be stored outside of the param tableGarming Sam2014-07-071-6/+6
| | | | | | | | | | In s3, flags could only be stored once in the param table and this was global. The param table defines only the default flags however. Change-Id: Ie673ad60dd499d930432c106e795e2cbd42d497b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove unnecessary dump a serviceGarming Sam2014-07-071-11/+3
| | | | | | | Change-Id: I59b4edf929b4f8338e4c1a7116e0d1ef1bcad287 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: simplify lp_do_parameterGarming Sam2014-07-071-4/+2
| | | | | | | | | No longer checks for globals vs service twice. Change-Id: I065e732ddb1ca2dda63dd22e3caf291fce8d327b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: replace lp_set_cmdline in s3 helpers to store_cmdlineGarming Sam2014-07-075-14/+32
| | | | | | | Change-Id: I9a6ac66eeb8e0dd9ba356f5201f7ac09784b476d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: Ensure the correct mem context is always being used from s3Garming Sam2014-07-071-2/+9
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org> Change-Id: I7b93822d0d06b00f08fecc2e55778767dd785b91
* param: set the flags on a s3 loadparm contextGarming Sam2014-07-075-1/+19
| | | | | | | | | | By setting up the flags when we initialize the context, the flags can be accessed by lib/param at any time. Change-Id: I60d4f3a9108560e204cf5f37da9c7d995939e146 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: flag fixes in s3 loadparmGarming Sam2014-07-072-1/+35
| | | | | | | | | | In s3 loadparm, the flags are stored in the param table, while in lib/param, it is individual to a loadparm context. Change-Id: I23d72eeec6b935c1897b34b8fc49d5a9992f2993 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: attempt to start factoring out the bInGlobalSection parameterGarming Sam2014-07-071-2/+3
| | | | | | | | | | Eventually this parameter should be solely on the loadparm context. It should really only have meaning during the globals init. Change-Id: If0fd2037ce4e8399fbf00f63bc138d9c146d7570 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: allow fallback to s3 do_section in lib/paramGarming Sam2014-07-071-1/+8
| | | | | | | | | | This means that pm_process will eventually only call one do_section method. Change-Id: I81ffd0d61783df3e6c267f06210d4180a291ab4c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: add do_section to s3 helpersGarming Sam2014-07-074-2/+4
| | | | | | | Change-Id: Ib9cee580f46fcb6d5046e606b4bfbf9e68dab76a Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: rename do_section in s3 to lp_do_section to avoid conflictsGarming Sam2014-07-071-5/+5
| | | | | | | Change-Id: I9bb090b3b501a1e958eec17988901baed16c58cb Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove unnecessary calls to do_parameter in s3Garming Sam2014-07-071-4/+25
| | | | | | | | | | | This aim of this is to try to factor out do_parameter. Ideally, do_parameter should strictly be called from pm_process. Change-Id: I990b53d0884e828f523a3b40e4ca72cc1596b06c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* lib/param: add deprecated warning to be consistent with s3Garming Sam2014-07-071-0/+10
| | | | | | | Change-Id: I79016279b8c5dce6263bff0477b808108e583d20 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove unnecessary lp_local_ptr_by_snum functionGarming Sam2014-07-071-11/+2
| | | | | | | | | | The function only appears twice and it can be easily inlined without any real loss to meaning or readability. Change-Id: Iabf6d202cedd95ad4f223e89c7d3be8dfbe36389 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: avoid the use of lp_do_parameter in poptGarming Sam2014-07-071-1/+1
| | | | | | | | | lp_do_parameter ideally should not be used outside of loadparm Change-Id: I310f1a0ff81867151accbda551751bafcdfd8c4d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>