samba.git
10 years agocmdline: Remove dynconfig hooks in command line processing
Andrew Bartlett [Wed, 8 Jan 2014 00:35:34 +0000 (13:35 +1300)]
cmdline: Remove dynconfig hooks in command line processing

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

10 years agoctdb-daemon: Consult CTDB_DEBUG_HUNG_SCRIPT variable before running debug script
Amitay Isaacs [Tue, 11 Feb 2014 06:29:26 +0000 (17:29 +1100)]
ctdb-daemon: Consult CTDB_DEBUG_HUNG_SCRIPT variable before running debug script

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

10 years agoctdb-eventscripts: Create extra files for ganesha recovery
Srikrishan Malik [Mon, 10 Feb 2014 05:49:08 +0000 (11:19 +0530)]
ctdb-eventscripts: Create extra files for ganesha recovery

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>
10 years agoctdb-eventscripts: Run mmlsconfig only once and use cached results
Srikrishan Malik [Mon, 10 Feb 2014 05:40:48 +0000 (11:10 +0530)]
ctdb-eventscripts: Run mmlsconfig only once and use cached results

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoparam: change share backend to use a constant string
Garming Sam [Thu, 16 Jan 2014 21:10:48 +0000 (10:10 +1300)]
param: change share backend to use a constant string

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

10 years agoparam: change fstype to use a constant string
Garming Sam [Thu, 16 Jan 2014 02:58:31 +0000 (15:58 +1300)]
param: change fstype to use a constant string

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>
10 years agoparam: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared between loadparms
Garming Sam [Thu, 16 Jan 2014 00:44:22 +0000 (13:44 +1300)]
param: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared 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>
10 years agoparam: move SMB2 defaults to lib/param and use in loadparm_init
Garming Sam [Thu, 16 Jan 2014 00:32:42 +0000 (13:32 +1300)]
param: move SMB2 defaults to lib/param and use in loadparm_init

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoparam: remove special cases for tls files
Garming Sam [Thu, 16 Jan 2014 00:13:11 +0000 (13:13 +1300)]
param: remove special cases for tls files

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoparam: use generate_param.py to generate loadparm_ctx_table.c
Garming Sam [Wed, 15 Jan 2014 04:55:56 +0000 (17:55 +1300)]
param: use generate_param.py to generate loadparm_ctx_table.c

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>
10 years agoparam: use generate_param.py to generate s3_param.h
Garming Sam [Wed, 15 Jan 2014 04:52:41 +0000 (17:52 +1300)]
param: use generate_param.py to generate s3_param.h

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>
10 years agoparam: use generate_param.py to generate param_local.h
Garming Sam [Wed, 15 Jan 2014 04:45:46 +0000 (17:45 +1300)]
param: use generate_param.py to generate param_local.h

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>
10 years agoparam: use generate_param.py to generate param_global.h
Garming Sam [Wed, 15 Jan 2014 04:39:48 +0000 (17:39 +1300)]
param: use generate_param.py to generate param_global.h

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>
10 years agoparam: No longer have a special case for lp_configfile
Andrew Bartlett [Wed, 15 Jan 2014 04:29:57 +0000 (17:29 +1300)]
param: No longer have a special case for lp_configfile

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>
10 years agolib/param: generate the param_functions.h containing the prototypes
Garming Sam [Wed, 15 Jan 2014 04:18:13 +0000 (17:18 +1300)]
lib/param: generate the param_functions.h containing the prototypes

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>
10 years agoparam: use generate_param.py to generate param_proto.h
Garming Sam [Wed, 15 Jan 2014 04:05:51 +0000 (17:05 +1300)]
param: use generate_param.py to generate param_proto.h

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>
10 years agolib/param: explicitly use mode=FUNCTIONS when running generate_param.py
Garming Sam [Wed, 15 Jan 2014 03:54:29 +0000 (16:54 +1300)]
lib/param: explicitly use mode=FUNCTIONS when running generate_param.py

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>
10 years agolib/param: update generate_param.py to generate more of loadparm
Garming Sam [Wed, 15 Jan 2014 03:49:50 +0000 (16:49 +1300)]
lib/param: update generate_param.py to generate more of loadparm

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>
10 years agolib/param: Remove special handling for 'state dir' and 'cache dir'
Andrew Bartlett [Wed, 15 Jan 2014 02:59:54 +0000 (15:59 +1300)]
lib/param: Remove special handling for 'state dir' and 'cache dir'

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>
10 years agolib/param: Normalise "read raw" and "write raw" parameters
Andrew Bartlett [Wed, 15 Jan 2014 01:48:40 +0000 (14:48 +1300)]
lib/param: Normalise "read raw" and "write raw" parameters

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>
10 years agoparam: auto generate param_functions.c at build time
Garming Sam [Tue, 14 Jan 2014 04:53:49 +0000 (17:53 +1300)]
param: auto generate param_functions.c at build time

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>
10 years agobuild: don't execute tests/summary.c
Gustavo Zacarias [Thu, 30 Jan 2014 20:59:48 +0000 (17:59 -0300)]
build: don't execute tests/summary.c

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>
10 years agos3: vfs_dirsort module.
Jeremy Allison [Tue, 11 Feb 2014 18:39:04 +0000 (10:39 -0800)]
s3: vfs_dirsort module.

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>
10 years agos3: vfs_dirsort module.
Jeremy Allison [Thu, 30 Jan 2014 01:01:30 +0000 (17:01 -0800)]
s3: vfs_dirsort module.

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>
10 years agos4:rpc_server/epmapper: make use of dcerpc_binding_dup() in build_ep_list()
Stefan Metzmacher [Tue, 4 Feb 2014 01:33:03 +0000 (02:33 +0100)]
s4:rpc_server/epmapper: make use of dcerpc_binding_dup() in build_ep_list()

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

10 years agos4:libnet: use dcerpc_binding_dup() in continue_epm_map_binding_send()
Stefan Metzmacher [Thu, 6 Feb 2014 17:52:20 +0000 (18:52 +0100)]
s4:libnet: use dcerpc_binding_dup() in continue_epm_map_binding_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: make use of dcerpc_binding_dup() in libnet_join.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:04:11 +0000 (22:04 +0100)]
s4:libnet: make use of dcerpc_binding_dup() in libnet_join.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_dup() in dcerpc_epm_map_binding_send()
Stefan Metzmacher [Sat, 25 Jan 2014 10:14:36 +0000 (11:14 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_dup() in dcerpc_epm_map_binding_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: fix memory hierachie in dcerpc_epm_map_binding_send()
Stefan Metzmacher [Sat, 25 Jan 2014 10:13:26 +0000 (11:13 +0100)]
s4:librpc/rpc: fix memory hierachie in dcerpc_epm_map_binding_send()

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>
10 years agos4:librpc/rpc: avoid some indentation levels in dcerpc_epm_map_binding_send()
Stefan Metzmacher [Sat, 25 Jan 2014 09:54:45 +0000 (10:54 +0100)]
s4:librpc/rpc: avoid some indentation levels in dcerpc_epm_map_binding_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: use dcerpc_binding_dup() in dcerpc_schannel_key_send()
Stefan Metzmacher [Thu, 6 Feb 2014 17:51:45 +0000 (18:51 +0100)]
s4:librpc/rpc: use dcerpc_binding_dup() in dcerpc_schannel_key_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: add dcerpc_transport_by_name()
Stefan Metzmacher [Thu, 23 Jan 2014 11:03:46 +0000 (12:03 +0100)]
librpc/rpc: add dcerpc_transport_by_name()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_client: use address "0.0.0.0" and port "135" for epmapper requests
Stefan Metzmacher [Thu, 30 Jan 2014 08:23:40 +0000 (09:23 +0100)]
s3:rpc_client: use address "0.0.0.0" and port "135" for epmapper requests

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>
10 years agolibrpc/rpc: simplify dcerpc_binding_build_tower()
Stefan Metzmacher [Thu, 30 Jan 2014 22:05:48 +0000 (23:05 +0100)]
librpc/rpc: simplify dcerpc_binding_build_tower()

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>
10 years agolibrpc/rpc: fix dcerpc_floor_set_rhs_data() with NULL data.
Stefan Metzmacher [Thu, 30 Jan 2014 22:03:03 +0000 (23:03 +0100)]
librpc/rpc: fix dcerpc_floor_set_rhs_data() with NULL data.

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>
10 years agolibrpc/rpc: handle dcerpc_binding->host == NULL in dcerpc_floor_get_rhs_data()
Stefan Metzmacher [Mon, 10 Feb 2014 17:56:59 +0000 (18:56 +0100)]
librpc/rpc: handle dcerpc_binding->host == NULL in dcerpc_floor_get_rhs_data()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture: handle binding_struct->host == NULL in torture_parse_target()
Stefan Metzmacher [Sun, 26 Jan 2014 00:55:52 +0000 (01:55 +0100)]
s4:torture: handle binding_struct->host == NULL in torture_parse_target()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/test: an empty hostname means b->host == NULL
Stefan Metzmacher [Fri, 24 Jan 2014 08:20:50 +0000 (09:20 +0100)]
s4:librpc/test: an empty hostname means b->host == NULL

In future we'll not allow b->host == "" any more.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: fix talloc hierachie dcesrv_context => dcesrv_endpoint => dcesrv_if_list
Stefan Metzmacher [Thu, 6 Feb 2014 17:59:53 +0000 (18:59 +0100)]
s4:rpc_server: fix talloc hierachie dcesrv_context => dcesrv_endpoint => dcesrv_if_list

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: only replace ipv4 addresses in _epm_Lookup() and _epm_Map()
Stefan Metzmacher [Fri, 31 Jan 2014 20:10:41 +0000 (21:10 +0100)]
s3:srv_epmapper: only replace ipv4 addresses in _epm_Lookup() and _epm_Map()

The floor data for EPM_PROTOCOL_IP only handles a 4 byte ipv4 address.
"0.0.0.0" is used for ipv6 and hostnames.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: fix logic in endpoints_match()
Stefan Metzmacher [Fri, 31 Jan 2014 22:20:05 +0000 (23:20 +0100)]
s3:srv_epmapper: fix logic in endpoints_match()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: fix rpc.scanner test
Stefan Metzmacher [Fri, 24 Jan 2014 10:31:25 +0000 (11:31 +0100)]
s4:torture/rpc: fix rpc.scanner test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: pass object down to test_Map_display()
Stefan Metzmacher [Thu, 30 Jan 2014 22:00:40 +0000 (23:00 +0100)]
s4:torture/rpc: pass object down to test_Map_display()

We also pass the given tower unmodified first.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: print out the object guid in rpc.epmapper.epmapper.Lookup_simple
Stefan Metzmacher [Fri, 24 Jan 2014 10:00:04 +0000 (11:00 +0100)]
s4:torture/rpc: print out the object guid in rpc.epmapper.epmapper.Lookup_simple

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: test all auth_types (8bit) in rpc.mgmt
Stefan Metzmacher [Fri, 24 Jan 2014 09:36:37 +0000 (10:36 +0100)]
s4:torture/rpc: test all auth_types (8bit) in rpc.mgmt

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: fix rpc.mgmt test
Stefan Metzmacher [Fri, 24 Jan 2014 09:31:32 +0000 (10:31 +0100)]
s4:torture/rpc: fix rpc.mgmt test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove unused variable in session_key.c
Stefan Metzmacher [Tue, 4 Feb 2014 09:08:48 +0000 (10:08 +0100)]
s4:torture/rpc: remove unused variable in session_key.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove unused variable in frsapi.c
Stefan Metzmacher [Tue, 4 Feb 2014 09:08:48 +0000 (10:08 +0100)]
s4:torture/rpc: remove unused variable in frsapi.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove unused variable in dsgetinfo.c
Stefan Metzmacher [Tue, 4 Feb 2014 09:08:48 +0000 (10:08 +0100)]
s4:torture/rpc: remove unused variable in dsgetinfo.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove unused variable in backupkey.c
Stefan Metzmacher [Tue, 4 Feb 2014 09:08:48 +0000 (10:08 +0100)]
s4:torture/rpc: remove unused variable in backupkey.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: fix compiler warnings in spoolss.c
Stefan Metzmacher [Tue, 4 Feb 2014 08:52:49 +0000 (09:52 +0100)]
s4:torture/rpc: fix compiler warnings in spoolss.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/drs: remove unused variables.
Stefan Metzmacher [Tue, 4 Feb 2014 09:07:59 +0000 (10:07 +0100)]
s4:torture/drs: remove unused variables.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: initialize struct dcerpc_binding completely
Stefan Metzmacher [Sun, 26 Jan 2014 09:11:03 +0000 (10:11 +0100)]
s4:torture/rpc: initialize struct dcerpc_binding completely

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: initialize struct dcerpc_binding completely
Stefan Metzmacher [Sun, 26 Jan 2014 09:10:37 +0000 (10:10 +0100)]
s3:rpcclient: initialize struct dcerpc_binding completely

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: initialize struct dcerpc_binding completely
Stefan Metzmacher [Sun, 26 Jan 2014 09:09:49 +0000 (10:09 +0100)]
s3:rpc_server: initialize struct dcerpc_binding completely

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_up: avoid useless talloc_zero() calls
Stefan Metzmacher [Thu, 30 Jan 2014 08:54:24 +0000 (09:54 +0100)]
s3:dcerpc_up: avoid useless talloc_zero() calls

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: make ep_register() more tolerant regarding the passes binding vector
Stefan Metzmacher [Thu, 30 Jan 2014 08:51:09 +0000 (09:51 +0100)]
s3:dcerpc_ep: make ep_register() more tolerant regarding the passes binding vector

We should take a copy and set the abstract syntax to from the given interface
before we construct the tower.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: only use the explicitly passed object_guid
Stefan Metzmacher [Thu, 30 Jan 2014 08:51:09 +0000 (09:51 +0100)]
s3:dcerpc_ep: only use the explicitly passed object_guid

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: only use an array of 'struct dcerpc_binding *'
Stefan Metzmacher [Fri, 7 Feb 2014 14:50:29 +0000 (15:50 +0100)]
s3:dcerpc_ep: only use an array of 'struct dcerpc_binding *'

In future we should not dereference struct dcerpc_binding
and just keep pointers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: make struct dcerpc_binding_vector private
Stefan Metzmacher [Fri, 7 Feb 2014 14:50:29 +0000 (15:50 +0100)]
s3:dcerpc_ep: make struct dcerpc_binding_vector private

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: let dcerpc_floor_get_rhs_data() return 'char *'
Stefan Metzmacher [Mon, 3 Feb 2014 08:06:08 +0000 (09:06 +0100)]
librpc/rpc: let dcerpc_floor_get_rhs_data() return 'char *'

We don't return any "const char *" values here, so give the caller
a chance to talloc_free() the result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: remove prototypes which are already in librpc/rpc/rpc_common.h
Stefan Metzmacher [Mon, 3 Feb 2014 08:04:49 +0000 (09:04 +0100)]
s4:librpc/rpc: remove prototypes which are already in librpc/rpc/rpc_common.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: use the correct _recv function in continue_open_pipe()
Stefan Metzmacher [Tue, 4 Feb 2014 10:06:21 +0000 (11:06 +0100)]
s4:librpc/rpc: use the correct _recv function in continue_open_pipe()

We start with dcerpc_pipe_open_unix_stream_send() so we need
to call dcerpc_pipe_open_unix_stream_recv().

It was just luck that it worked before...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: add ndr_table_by_syntax()
Stefan Metzmacher [Fri, 24 Jan 2014 09:28:05 +0000 (10:28 +0100)]
librpc/ndr: add ndr_table_by_syntax()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: add witness command
Gregor Beck [Mon, 5 Aug 2013 09:01:34 +0000 (11:01 +0200)]
s3:rpcclient: add witness command

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/idl: add witness.idl
Stefan Metzmacher [Fri, 2 Nov 2012 15:27:46 +0000 (16:27 +0100)]
librpc/idl: add witness.idl

See [MS-SWN] for the details.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoselftest: let "make testenv SCREEN=1" use tmux if it is running
Gregor Beck [Thu, 12 Dec 2013 10:38:22 +0000 (11:38 +0100)]
selftest: let "make testenv SCREEN=1" use tmux if it is running

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: check verification trailer
Gregor Beck [Fri, 10 Jan 2014 12:56:06 +0000 (13:56 +0100)]
s3:rpc_server: check verification trailer

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: check header of each packet fragment
Gregor Beck [Thu, 9 Jan 2014 12:55:27 +0000 (13:55 +0100)]
s3:rpc_server: check header of each packet fragment

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: only become the user if we have a valid context_id
Stefan Metzmacher [Wed, 15 Jan 2014 09:27:49 +0000 (10:27 +0100)]
s3:rpc_server: only become the user if we have a valid context_id

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: minor refactoring of process_request_pdu()
Gregor Beck [Thu, 9 Jan 2014 09:15:31 +0000 (10:15 +0100)]
s3:rpc_server: minor refactoring of process_request_pdu()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:librpc/rpc: only propose header signing if we use sign or seal
Stefan Metzmacher [Tue, 21 Jan 2014 14:18:01 +0000 (15:18 +0100)]
s3:librpc/rpc: only propose header signing if we use sign or seal

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: check verification trailer
Gregor Beck [Wed, 8 Jan 2014 09:35:48 +0000 (10:35 +0100)]
s4:rpc_server: check verification trailer

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: check header of each packet fragment
Gregor Beck [Thu, 9 Jan 2014 08:47:25 +0000 (09:47 +0100)]
s4:rpc_server: check header of each packet fragment

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: verifiy the auth_info against the per connection values
Stefan Metzmacher [Thu, 9 Jan 2014 09:59:01 +0000 (10:59 +0100)]
s4:rpc_server: verifiy the auth_info against the per connection values

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: only propose header signing if we use sign or seal
Stefan Metzmacher [Thu, 16 Jan 2014 06:49:56 +0000 (07:49 +0100)]
s4:librpc/rpc: only propose header signing if we use sign or seal

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: add forward declaration for struct resolve_context
Stefan Metzmacher [Thu, 23 Jan 2014 08:48:53 +0000 (09:48 +0100)]
s4:librpc/rpc: add forward declaration for struct resolve_context

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: add dcerpc_sec_verification_trailer_check()
Gregor Beck [Wed, 8 Jan 2014 08:50:33 +0000 (09:50 +0100)]
librpc/rpc: add dcerpc_sec_verification_trailer_check()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: add dcerpc_sec_vt_header2_[from_ncacn_packet|equal]()
Gregor Beck [Mon, 13 Jan 2014 12:33:09 +0000 (13:33 +0100)]
librpc/rpc: add dcerpc_sec_vt_header2_[from_ncacn_packet|equal]()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: add ndr_syntax_id_[from|to]_string()
Stefan Metzmacher [Tue, 4 Feb 2014 11:54:42 +0000 (12:54 +0100)]
librpc/ndr: add ndr_syntax_id_[from|to]_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: add ndr_pull_append/pop()
Stefan Metzmacher [Sat, 21 Sep 2013 00:28:33 +0000 (02:28 +0200)]
librpc/ndr: add ndr_pull_append/pop()

They can be used to parse a fragmented NDR byte stream.

ndr_pull_append() appends more data that can be processed
and ndr_pull_pop() removed already processed data.

This will be used to implement dcerpc pipes, where we can get
a verify large amount of pipe chunks, once we processed a chunk
we can forget about the related data, but we may need to keep some
bytes in order to get the alignment right.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: add support for a shallow copy to ndr_pull_subcontext_start/end
Stefan Metzmacher [Sat, 21 Sep 2013 19:58:05 +0000 (21:58 +0200)]
librpc/ndr: add support for a shallow copy to ndr_pull_subcontext_start/end

This will be usefull to try parsing DCERPC pipe chunks for
LIBNDR_FLAG_INCOMPLETE_BUFFER.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: remember INCOMPLETE_BUFFER missing bytes in relative_highest_offset
Stefan Metzmacher [Sat, 21 Sep 2013 20:30:25 +0000 (22:30 +0200)]
librpc/ndr: remember INCOMPLETE_BUFFER missing bytes in relative_highest_offset

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: add NDR_ERR_INCOMPLETE_BUFFER and LIBNDR_FLAG_INCOMPLETE_BUFFER
Stefan Metzmacher [Tue, 8 Mar 2011 09:14:51 +0000 (10:14 +0100)]
librpc/ndr: add NDR_ERR_INCOMPLETE_BUFFER and LIBNDR_FLAG_INCOMPLETE_BUFFER

If we pull a pipe chunk we need a way to check if we
have enough bytes to parse the complete chunk.

Setting ndr_pull->flags |= LIBNDR_FLAG_INCOMPLETE_BUFFER
would change NDR_ERR_BUFSIZE (and later maybe others)
into NDR_ERR_INCOMPLETE_BUFFER.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/ndr: fix headers in ndr_dcerpc.c
Gregor Beck [Fri, 17 Jan 2014 11:13:50 +0000 (12:13 +0100)]
librpc/ndr: fix headers in ndr_dcerpc.c

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolib/ldb-samba: add more attributes with LDB_SYNTAX_SAMBA_GUID
Stefan Metzmacher [Wed, 29 Jan 2014 07:24:11 +0000 (08:24 +0100)]
lib/ldb-samba: add more attributes with LDB_SYNTAX_SAMBA_GUID

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agowinbind4: Remove unused winbind_get_idmap irpc operation
Volker Lendecke [Tue, 4 Feb 2014 10:22:25 +0000 (10:22 +0000)]
winbind4: Remove unused winbind_get_idmap irpc operation

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 10 13:24:09 CET 2014 on sn-devel-104

10 years agoauth4: Remove unused wbc_context
Volker Lendecke [Tue, 4 Feb 2014 10:18:48 +0000 (10:18 +0000)]
auth4: Remove unused wbc_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agontvfs_unixuid: No wbc_context required
Volker Lendecke [Mon, 3 Feb 2014 20:36:25 +0000 (21:36 +0100)]
ntvfs_unixuid: No wbc_context required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agontvfs_posix: No wbc_context required
Volker Lendecke [Mon, 3 Feb 2014 20:35:05 +0000 (21:35 +0100)]
ntvfs_posix: No wbc_context required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agodcesrv_unixinfo: No wbc_context required
Volker Lendecke [Mon, 3 Feb 2014 20:33:21 +0000 (21:33 +0100)]
dcesrv_unixinfo: No wbc_context required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agounixuid: Use the tevent_context from the ntvfs_context
Volker Lendecke [Sun, 2 Feb 2014 14:54:53 +0000 (15:54 +0100)]
unixuid: Use the tevent_context from the ntvfs_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agopvfs: Use the tevent_context from the ntvfs_context
Volker Lendecke [Sun, 2 Feb 2014 14:53:25 +0000 (15:53 +0100)]
pvfs: Use the tevent_context from the ntvfs_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agoauth4: Do not generate just a temporary wbc_context
Volker Lendecke [Sun, 2 Feb 2014 14:50:08 +0000 (15:50 +0100)]
auth4: Do not generate just a temporary wbc_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agoauth4: auth_session_info_fill_unix only needs a tevent_context
Volker Lendecke [Sun, 2 Feb 2014 14:48:03 +0000 (15:48 +0100)]
auth4: auth_session_info_fill_unix only needs a tevent_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agoauth4: security_token_to_unix_token only needs a tevent_context
Volker Lendecke [Sun, 2 Feb 2014 14:45:47 +0000 (15:45 +0100)]
auth4: security_token_to_unix_token only needs a tevent_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agolibwbclient4: Remove unused composite-based functions
Volker Lendecke [Sun, 2 Feb 2014 14:45:13 +0000 (15:45 +0100)]
libwbclient4: Remove unused composite-based functions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agosource4: Use wbc_xids_to_sids
Volker Lendecke [Sun, 2 Feb 2014 14:35:02 +0000 (15:35 +0100)]
source4: Use wbc_xids_to_sids

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agolibwbclient4: Add wbc_xids_to_sids
Volker Lendecke [Sat, 1 Feb 2014 19:46:28 +0000 (20:46 +0100)]
libwbclient4: Add wbc_xids_to_sids

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agosource4: Use wbc_sids_to_xids
Volker Lendecke [Thu, 30 Jan 2014 20:12:07 +0000 (20:12 +0000)]
source4: Use wbc_sids_to_xids

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>