summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* param: move defaults_saved global out of dump_globals functionGarming Sam2014-07-071-3/+3
| | | | | | | | | Removes an unnecessary dependency on a global variable. Change-Id: I87fc63190a3b8ceba5fb5606fa0e7d5e1f2633a4 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_helper in s3 loadparmGarming Sam2014-07-071-120/+1
| | | | | | | Change-Id: I1ed19ee7290f6b52f624e2aa700cf402cfcb255d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: finish the set_param_helper lineup by rearranging case orderGarming Sam2014-07-071-6/+7
| | | | | | | | | Attempting to make the code match exactly before moving it over. Change-Id: If05fccd11d245176b5793e59d1b92317b25fd2c8 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: make some more changes to lp_do_parameter to match set_variable_helperGarming Sam2014-07-072-19/+31
| | | | | | | | | Attempting to make the code match exactly before moving it over. Change-Id: Ie7a30d5477f3fbf95f8f43e1ac1f76b581d87709 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: change set_variable_helper formattingGarming Sam2014-07-071-4/+6
| | | | | | | | | Attempting to make the code match exactly before moving it over. Change-Id: Id5571b00a8afd7dffc6197f2c7e020dd4fd59f85 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 align the set_variable_helper with lp_do_parameterGarming Sam2014-07-071-3/+2
| | | | | | | | | This should allow some of it to be factored out into lib/param. 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: I7d0b3b4114c73aeaf9bf63e8c5fcd0a9d00cfc00
* param: use str_list_make_v3 instead of str_list_make in s3Garming Sam2014-07-071-2/+2
| | | | | | | Change-Id: Iea5aa39b9848bb19b0df3c70f249fd63bb61455e 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 null checks for upcoming str_list_make changesGarming Sam2014-07-072-2/+6
| | | | | | | | | | | | | In changing str_list_make to str_list_make_v3, the list can be NULL. These are some additional checks to try to avoid any problems. Where lists are dealt with, they typically check both if the list is empty or the list is NULL. Change-Id: I9012c31dbd9832ce877728bcb3346616ba64c4c5 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: pre-emptively correct use of str_list_make_v3 in lib/paramGarming Sam2014-07-072-0/+8
| | | | | | | | | | | | | | | lib/param uses str_list_make, while, s3 uses str_list_make_v3. These differ slightly and should be made the same. Notably it returns NULL when given a null or empty string Also, includes the null check in s3 code to be consistent for merging this section of code later on. Change-Id: Ib543a5a5307e06989621ea16bfe87e315d66a7ef 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: factor out a common portion of set_variableGarming Sam2014-07-071-14/+30
| | | | | | | Change-Id: Id8eeb480a377b4df8c3f51daf0d253f032fd0e83 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 the plus/minus syntax for reading in lists in s3 loadparmGarming Sam2014-07-071-0/+31
| | | | | | | | | | | | | | This changes the behaviour the following parameters: server services, dcerpc endpoint servers and ntvfs handler These parameters were introduced with samba4 and are the parameters which should utilize the newer list syntax. This allows merging between the setting of parameters. Change-Id: Id6226b5bede5cd4908f6718bd1b799faf881927d 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 a number of parameters from P_LIST to P_CMDLISTGarming Sam2014-07-073-28/+28
| | | | | | | | | | | | | | | | | | These parameters are being changed to use their original syntax to match source3. netbios aliases, interfaces, auth methods, invalid users, valid users, admin users, read list, write list, hosts allow, hosts deny, preload modules, smb ports, name resolve order, svcctl list, cluster addresses, init logon delayed hosts, wins server, eventlog list, usershare prefix allow list, usershare prefix deny list, vfs objects, winbind nss info The documentation has also been changed to be consistent with the change. Change-Id: I536481098a508e0366c910b180f2db6a6f0634a9 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: ensure CMD_LIST is freed when freeing a parameterGarming Sam2014-07-071-1/+1
| | | | | | | | | | | As well as correctly deallocating the memory, this prevents a potential bug where s3 globals struct may be freed, but it can be referred to elsewhere. Change-Id: I92fc9baa26aee5b4a35b767bed901928cbb7c74f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* smbcacls: parse config file argument prior to loadDavid Disseldorp2014-07-071-2/+3
| | | | | | | | | | Fixes usage with the common "-s|--configfile" parameter. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 7 23:30:50 CEST 2014 on sn-devel-104
* net/doc: make clear that net vampire is for NT4 domains onlyBjörn Jacke2014-07-071-0/+2
| | | | | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=3263 Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Mon Jul 7 21:01:25 CEST 2014 on sn-devel-104
* torture4: Add trivial epoch testVolker Lendecke2014-07-072-0/+55
| | | | | | | | 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): Mon Jul 7 18:36:37 CEST 2014 on sn-devel-104
* torture4: Add smb2.lease.nobreakselfVolker Lendecke2014-07-072-0/+88
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture4: Add a test to break a handle twiceVolker Lendecke2014-07-072-0/+67
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture4: Make sure we copy the parent_lease_keyVolker Lendecke2014-07-072-6/+52
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Use BVALVolker Lendecke2014-07-071-8/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-tests: Add a test for ctdb restoredbAmitay Isaacs2014-07-071-0/+118
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Jul 7 16:06:39 CEST 2014 on sn-devel-104
* ctdb-tests: Check that ctdb wipedb cleans the databaseAmitay Isaacs2014-07-071-0/+10
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Do not thaw databases if recovery is activeAmitay Isaacs2014-07-074-6/+14
| | | | | | | | This prevents ctdb tool from thawing databases prematurely in thaw/wipedb/restoredb commands if recovery is active. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-recoverd: Set recovery mode before freezing databasesAmitay Isaacs2014-07-072-22/+22
| | | | | | | | | | Setting recovery mode to active is the only correct way to inform recovery daemon to run database recovery. Only freezing databases without setting recovery mode should not trigger database recovery, as this mechanism is used in tool to implement wipedb/restoredb commands. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-tools: There is no need for forcing a recoveryAmitay Isaacs2014-07-071-13/+0
| | | | | | | | | | This effectively reverts commit 442953c540424ad0c64f4264b5ee27c45a3130e8. The correct way of telling recovery daemon to trigger a database recovery is by setting recovery mode to active. There is no need to freeze databases as recovery master will do that across the cluster anyway. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* Revert "It was possible for ->recovery_mode to get out of sync with the new ↵Amitay Isaacs2014-07-071-10/+1
| | | | | | | | | | | | | | three db priorities in such a way that" This reverts commit 6578a97bd94fc14d5b6df85b84e50447f7bdb2e3. This condition cannot happen since when recovery is triggered, all the databases would get frozen and thawed in the order of priority. The only other place where databases get frozen are for implementation of ctdb wipedb/restoredb commands. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Use SCHED_RESET_ON_FORK when setting SCHED_FIFOMartin Schwenke2014-07-071-1/+7
| | | | | | | | | | This makes the scheduler reset code a no-op. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Jul 7 13:28:25 CEST 2014 on sn-devel-104
* ctdb-recoverd: Don't say "Election timed out"Martin Schwenke2014-07-071-1/+1
| | | | | | | | That makes people think there's a problem (and report bugs) so say something a bit less scary instead... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recoverd: Log a message when releasing the recovery lockMartin Schwenke2014-07-071-0/+1
| | | | | | | | It is a non-trivial event and will make it easier to debug recovery lock issues. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Support NFS on RHEL7 with systemdMartin Schwenke2014-07-071-2/+4
| | | | | | | | | Need to be able to recognise a RHEL system. Still use "system" to start and stop service, since that still works and yields the smallest change. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>