summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* s4:torture/rpc: s/pipe/p/ in order to avoid compiler warningsStefan Metzmacher2014-02-131-7/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:client: fix some compiler warningsStefan Metzmacher2014-02-131-7/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:auth/gensec: only include "librpc/gen_ndr/dcerpc.h"Stefan Metzmacher2014-02-132-2/+2
| | | | | | | We only need some DCERPC_ defines. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* auth/gensec: only include "librpc/gen_ndr/dcerpc.h"Stefan Metzmacher2014-02-132-2/+2
| | | | | | | We only need some DCERPC_ defines. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* build: allow some python variable overridesGustavo Zacarias2014-02-131-0/+13
| | | | | | | | | | | | | | | | The python variables (settings) are fetched from a running python interpreter which usually isn't the target one when cross compiling, hence libraries and flags aren't the same and can pollute the target build. Allow some of these variables to be redefined via environment variables in order to aid cross-compiling. According to testing python_LDFLAGS and python_LIBDIR should be enough. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 13 06:03:26 CET 2014 on sn-devel-104
* ctdb-tests: Handle interactions with monitor eventsMartin Schwenke2014-02-131-7/+3
| | | | | | | | | | | | | | | In the first case, reconfiguration can longer happen in a monitor event, so this is no longer a problem. Drop it. Running a monitor event by hand no longer cancels the existing monitor event. Instead the hand-run event fails. So do this differently and just wait for a monitor event before continuing. 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): Thu Feb 13 04:05:57 CET 2014 on sn-devel-104
* ctdb-recoverd: Fix a bug in the LCP2 rebalancing codeMartin Schwenke2014-02-135-22/+673
| | | | | | | | | | | | | | | | | srcimbl gets changed on every iteration of the loop. The value that should be stored for the new imbalance of the source node is minsrcimbl. To help diagnose this, added some extra debug that can be left in. The extra debug changes the output of a couple of tests. Note that the resulting IP allocations in those tests is unchanged - only the debug output is changed. Also add some new tests that illustrates the bug. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: New test to ensure "ctdb reloadips" manipulates IPs correctlyMartin Schwenke2014-02-131-0/+234
| | | | | | | | | | | | This adds a lot of IPs (currently 100) in a new network and deletes them in a few steps. First the primary is deleted and then a check is done to ensure that the remaining IPs are all correct. Then about 1/2 of the IPs and deleted and remaining IPs are checked. Then the remaining IPs are deleted and a check is done to ensure they are all gone. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests-eventscripts: Testing support for promote_secondariesMartin Schwenke2014-02-132-2/+12
| | | | | | | | | Just enable this behaviour by default in the ip command stub, since 10.interface assumes/sets it. The rc.local replacement for set_proc() doesn't do anything... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-eventscripts: Deleting IPs should use the promote_secondaries optionMartin Schwenke2014-02-132-71/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a primary IP address is being deleted from an interface, the secondaries are remembered and added back after the primary is deleted. This is done under a lock shared by the add/del script code. It is necessary because, by default, Linux deletes secondaries when the corresponding primary is deleted. There is a race here between ctdbd and the scripts, since ctdbd doesn't know about the lock. If ctdbd receives a release IP control and the IP address is not on an interface then it is regarded as a "Redundant release of IP" so no "releaseip" event is generated. This can occur if the IP address in question is a secondary that has been temporarily dropped. It is more likely if the number of secondaries is large. Since Linux 2.6.12 (i.e. 2005) Linux has supported a promote_secondaries option on interfaces. This option is currently undocumented but that will change in Linux 3.14. With promote_secondaries enabled the kernel will not drop secondaries but will promote a corresponding secondary instead. The kernel does all necessary locking. Use promote_secondaries to simplify the code, avoid re-adding secondaries, avoid re-adding routes and provide improved performance. This could be done conditionally, with a fallback to legacy secondary-re-adding code, but no supported Linux distribution is running a pre-2.6.12 kernel so this is unnecessary. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* waf:lib/replace fix iconv checks on HP/UXChristian Ambach2014-02-131-1/+1
| | | | | | | | | | | | | | | | | we need to copy away the list of LDFLAGS to be tried before modifying it instead of just creating a new reference and then continuing with a modified list while it should have been reset back to the original value Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 13 02:01:03 CET 2014 on sn-devel-104
* smbXsrv_open.c: Initialize local variable.Christopher R. Hertel (crh)2014-02-121-1/+1
| | | | | | | | | | | | | | Coverity fix. Initialize status to NT_STATUS_OK. Otherwise, there are code paths that would cause the smbXsrv_open_cleanup() function to return an uninitialized value. Cov: 1168008 Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Feb 12 23:57:05 CET 2014 on sn-devel-104
* auth: Make new_server_id_task() static to auth_samba4Volker Lendecke2014-02-123-43/+42
| | | | | | | | This is not used in other parts of source3, so this patch improves modularity and isolation of features. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Slightly simplify vfswrap_fsctlVolker Lendecke2014-02-121-1/+2
| | | | | | | We have the MIN macro, so use it :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Fix an uninitialized readVolker Lendecke2014-02-121-0/+1
| | | | | | | We have to ship 64 bytes, and we have to initialize the whole thing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* cmdline: Remove dynconfig hooks in command line processingAndrew Bartlett2014-02-122-146/+0
| | | | | | | | | | | | | | | | | | | | | | This removes the ability to set paths like the sbindir, bindir, and changes the tool for setting lockdir statedir etc to be via --option="lock dir=/var/lock". These were originally added by commit 90a6873b0570f2691ba8d8fd11154c856bdd4415 by James Peach <jpeach@samba.org> The important use case, qemu, does not use these options, but specifies these directories via an smb.conf. They are being removed to remove a layer from the loadparm system, now that options can be specified from the command line. It will also make it easier to generate the affected parameters from the XML documentation if this layer of indirection is removed. Andrew Bartlett 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): Wed Feb 12 16:42:14 CET 2014 on sn-devel-104
* ctdb-daemon: Consult CTDB_DEBUG_HUNG_SCRIPT variable before running debug scriptAmitay Isaacs2014-02-121-0/+4
| | | | | | | | | | | | If CTDB_DEUB_HUNG_SCRIPT is set, use that instead of the default debug script. This code was dropped by mistake in commit 18c1f432102f1a5093927be9276d001180539e50. 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): Wed Feb 12 08:47:47 CET 2014 on sn-devel-104
* ctdb-eventscripts: Create extra files for ganesha recoverySrikrishan Malik2014-02-121-0/+2
| | | | | | | | | | This adds new files for Ganesha's recovery. myreleaseip_* are used by the recovery thread on the node where IP is released. The releaseip_* and tekeip_* files are used by recovery thread where IP is taken over. Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-eventscripts: Run mmlsconfig only once and use cached resultsSrikrishan Malik2014-02-121-2/+20
| | | | | | Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* param: change share backend to use a constant stringGarming Sam2014-02-121-0/+1
| | | | | | | | | | | Substitution is not necessary for this parameter. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 12 03:17:39 CET 2014 on sn-devel-104
* param: change fstype to use a constant stringGarming Sam2014-02-126-7/+8
| | | | | | | | Substitution isn't really necessary for this parameter. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared ↵Garming Sam2014-02-123-34/+17
| | | | | | | | between loadparms Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: move SMB2 defaults to lib/param and use in loadparm_initGarming Sam2014-02-123-9/+10
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove special cases for tls filesGarming Sam2014-02-128-30/+25
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate loadparm_ctx_table.cGarming Sam2014-02-122-141/+2
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate s3_param.hGarming Sam2014-02-123-197/+4
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate param_local.hGarming Sam2014-02-122-6/+5
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate param_global.hGarming Sam2014-02-125-218/+5
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: No longer have a special case for lp_configfileAndrew Bartlett2014-02-128-9/+5
| | | | | | | | | | | | | | This parameter is renamed because it does not normally return the current smb.conf file, but instead returns the next one, as found in a config file = directive, to be loaded. This avoids a conflict with the lpcfg_configfile from lib/param, which does refer to the current smb.conf path. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/param: generate the param_functions.h containing the prototypesGarming Sam2014-02-124-45/+12
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate param_proto.hGarming Sam2014-02-123-201/+7
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/param: explicitly use mode=FUNCTIONS when running generate_param.pyGarming Sam2014-02-121-1/+1
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/param: update generate_param.py to generate more of loadparmGarming Sam2014-02-121-24/+259
| | | | | | | | These files can now be generated directly from the xml rather than from param_functions.c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/param: Remove special handling for 'state dir' and 'cache dir'Andrew Bartlett2014-02-129-46/+16
| | | | | | | | | | | | | | | The build system gives these two parameters different defaults (compared with lock dir) in both the --enable-fhs and default mode, so the logic to use lock dir no longer applies unless the build has been very specially constructed. Therefore, remove the special case handling and make these normal parameters again. Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/param: Normalise "read raw" and "write raw" parametersAndrew Bartlett2014-02-128-44/+61
| | | | | | | | | | | They have been changed to function like normal parameters, removing a special case in the loadparm system. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Michael Adam <obnox@samba.org>
* param: auto generate param_functions.c at build timeGarming Sam2014-02-126-420/+131
| | | | | | | | | | | generate_param.py reads the documentation to define which functions need to be generated. To add new parameters, edit the xml files in docs-xml/smbdotconf. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* build: don't execute tests/summary.cGustavo Zacarias2014-02-122-10/+5
| | | | | | | | | | | tests/summary.c will never be able to be executed when cross compiling. Use #error and #warning directives to fail or warn accordingly when compiling it. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s3: vfs_dirsort module.Jeremy Allison2014-02-122-0/+9
| | | | | | | | | | | | Add raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: vfs_dirsort module.Jeremy Allison2014-02-121-7/+112
| | | | | | | | | | | | | | | | | | | | | | | Allow dirsort to work when multiple simultaneous directories are open. The old code only keeps one active private data pointer on the connection struct, opening a second directory on the same connection will overwrite it. This modification turns the private data pointer into a linked list of open directories on the connection struct, and finds the correct one by searching on the passed in DIR *. With this code in place, smbd passes raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:rpc_server/epmapper: make use of dcerpc_binding_dup() in build_ep_list()Stefan Metzmacher2014-02-111-4/+11
| | | | | | | | | | We should not alter the callers binding. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Feb 11 18:30:55 CET 2014 on sn-devel-104
* s4:libnet: use dcerpc_binding_dup() in continue_epm_map_binding_send()Stefan Metzmacher2014-02-111-5/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: make use of dcerpc_binding_dup() in libnet_join.cStefan Metzmacher2014-02-111-4/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:librpc/rpc: make use of dcerpc_binding_dup() in dcerpc_epm_map_binding_send()Stefan Metzmacher2014-02-111-11/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:librpc/rpc: fix memory hierachie in dcerpc_epm_map_binding_send()Stefan Metzmacher2014-02-111-7/+6
| | | | | | | | We should allocate on 's' the internal state, not on the callers mem_ctx. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:librpc/rpc: avoid some indentation levels in dcerpc_epm_map_binding_send()Stefan Metzmacher2014-02-111-17/+27
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:librpc/rpc: use dcerpc_binding_dup() in dcerpc_schannel_key_send()Stefan Metzmacher2014-02-111-3/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* librpc/rpc: add dcerpc_transport_by_name()Stefan Metzmacher2014-02-112-0/+19
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_client: use address "0.0.0.0" and port "135" for epmapper requestsStefan Metzmacher2014-02-111-2/+2
| | | | | | | | | | Note: binding->host = NULL lets dcerpc_binding_build_tower() use "0.0.0.0". This matches Windows clients. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* librpc/rpc: simplify dcerpc_binding_build_tower()Stefan Metzmacher2014-02-111-18/+15
| | | | | | | | | dcerpc_floor_set_rhs_data() handles the special cases now and we keep the 'host' part unmodified except EPM_PROTOCOL_IP addresses. No special '\\' handling anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* librpc/rpc: fix dcerpc_floor_set_rhs_data() with NULL data.Stefan Metzmacher2014-02-111-0/+7
| | | | | | | | For EPM_PROTOCOL_IP we can only marshal ipv4 addresses, everything else gets '0.0.0.0' (4 zero bytes on the wire). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>