kai/samba-autobuild/.git
8 years agoKCC: shift samba.ldif_utils to samba.kcc.ldif_import_export
Douglas Bagnall [Fri, 5 Jun 2015 03:09:05 +0000 (15:09 +1200)]
KCC: shift samba.ldif_utils to samba.kcc.ldif_import_export

These functions are really only of use for KCC, and they only import and
export rather than be general utils.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove remnants of script from samba/kcc/__init__
Douglas Bagnall [Wed, 10 Jun 2015 03:39:40 +0000 (15:39 +1200)]
KCC: remove remnants of script from samba/kcc/__init__

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: shift samba.kcc intersite functions to samba.kcc.graph
Douglas Bagnall [Wed, 10 Jun 2015 04:42:54 +0000 (16:42 +1200)]
KCC: shift samba.kcc intersite functions to samba.kcc.graph

So samba.kcc.graph is the place to look for everything intersite.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: split kcc_utils into samba.kcc.{kcc_utils,graph}
Douglas Bagnall [Wed, 10 Jun 2015 04:42:37 +0000 (16:42 +1200)]
KCC: split kcc_utils into samba.kcc.{kcc_utils,graph}

graph.py has the intersite graph stuff.
kcc_utils does intrasite, namespace, &cetera.

The wildcard imports are tidied up, so samba_kcc imports unix2nttime
directly rather than letting it fall out of kcc_utils.

Intersite graph functions samba/kcc/__init__.py are also shifted into
graph.py.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: rearrange 3 functions in samba.kcc __init__
Douglas Bagnall [Wed, 10 Jun 2015 03:35:05 +0000 (15:35 +1200)]
KCC: rearrange 3 functions in samba.kcc __init__

This module still isn't actually used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: split and shift samba.graph_utils -> samba.kcc.{graph_utils,debug}
Douglas Bagnall [Wed, 3 Jun 2015 23:16:15 +0000 (11:16 +1200)]
KCC: split and shift samba.graph_utils -> samba.kcc.{graph_utils,debug}

The debug module contains debug functions and colours.

Graph_utils keeps the DOT file generation and graph verification code.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Reduce brokenness of samba.kcc module
Douglas Bagnall [Thu, 4 Jun 2015 22:59:23 +0000 (10:59 +1200)]
KCC: Reduce brokenness of samba.kcc module

This module is still not being used, and is being fixed slowly to make
it clear what is happening. Here we remove references to globals in
the samba_kcc script (notably opts), and instead add the various
options as KCC.__init__ arguments.

There is more to come.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Copy KCC core out of samba_kcc into samba.kcc module
Douglas Bagnall [Thu, 4 Jun 2015 22:49:30 +0000 (10:49 +1200)]
KCC: Copy KCC core out of samba_kcc into samba.kcc module

The "module" is not actually used at this point, which is just as well
as it would be utterly broken. This copy is just to show that the
eventual move is really a move and not a complete rewrite.

Note that if this file is not executable (and it really shouldn't be),
this commit causes the samba.tests.source test to fail with "Files
with shebang line that are not executable".

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agomessaging: Init server_id_db after clustering
Volker Lendecke [Thu, 11 Jun 2015 14:34:12 +0000 (14:34 +0000)]
messaging: Init server_id_db after clustering

server_id_db_init references our pid, which got changed by the clustering
initialization just a line above. So far names.tdb is just local, but
we should register our clustered id with vnn.pid instead of just the
pid nevertheless.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Autobuild-User(master): José A. Rivera <jarrpa@samba.org>
Autobuild-Date(master): Fri Jun 12 02:27:41 CEST 2015 on sn-devel-104

8 years agowinbindd: winbindd_raw_kerberos_login - ensure logon_info exists in PAC.
Jeremy Allison [Wed, 10 Jun 2015 23:31:21 +0000 (16:31 -0700)]
winbindd: winbindd_raw_kerberos_login - ensure logon_info exists in PAC.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 11 07:30:38 CEST 2015 on sn-devel-104

8 years agokerberos auth info3 should contain resource group ids available from pac_logon
Noel Power [Wed, 10 Jun 2015 12:13:25 +0000 (13:13 +0100)]
kerberos auth info3 should contain resource group ids available from pac_logon

successful pam auth (e.g. from ssh) will cache group sids (but not any
resource group sids)) The subsequent cached entry used for groups lookups
can be missing those resource groups

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agosmbd: Use new debug macros in kill-client-ip
Christof Schmitt [Tue, 9 Jun 2015 20:10:27 +0000 (13:10 -0700)]
smbd: Use new debug macros in kill-client-ip

Mainly to have the new macros actually used in the code.

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): Thu Jun 11 04:34:50 CEST 2015 on sn-devel-104

8 years agodebug: Change syslog priority mapping to match new log level macros
Christof Schmitt [Fri, 5 Jun 2015 22:09:34 +0000 (15:09 -0700)]
debug: Change syslog priority mapping to match new log level macros

This changes the mapping of internal log levels to syslog priorities to
match the previously defined helper macros. The idea is that this better
maps to the actual use of log levels in the Samba code.

unchanged
 log level     | priority
 0             | ERROR
 1             | WARNING
 2             | NOTICE

before
 log level     | priority
 3             | INFO
 4 and higher  | DEBUG

after
 log level     | priority
 3 to 5        | NOTICE
 6 to 9        | INFO
 10 and higher | DEBUG

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodebug: Add definitions and macros for log levels
Christof Schmitt [Fri, 5 Jun 2015 21:45:22 +0000 (14:45 -0700)]
debug: Add definitions and macros for log levels

This provides some convenience macros to use consistent log levels for
messages with different severities.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowbinfo: Dump user info for pam-logon -v
Volker Lendecke [Wed, 8 Apr 2015 09:17:51 +0000 (11:17 +0200)]
wbinfo: Dump user info for pam-logon -v

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos3:wscript: remove signal related configure checks
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
s3:wscript: remove signal related configure checks

These are done in lib/replace now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jun 10 17:50:41 CEST 2015 on sn-devel-104

8 years agolib/util: remove signal related configure checks
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
lib/util: remove signal related configure checks

These are done in lib/replace now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agolib/replace: add signal related configure checks
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
lib/replace: add signal related configure checks

These should be in a central place available for
all lib/replace users instead of having each caller
do its own checks.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoautobuild email mentions the elapsed time
Douglas Bagnall [Thu, 28 May 2015 01:46:23 +0000 (13:46 +1200)]
autobuild email mentions the elapsed time

This is occasionally very useful. When it is not, it is easily ignored.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 10 13:26:21 CEST 2015 on sn-devel-104

8 years agopytevent: Build for two versions of Python at once
Petr Viktorin [Fri, 22 May 2015 09:52:39 +0000 (11:52 +0200)]
pytevent: Build for two versions of Python at once

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 10 08:55:37 CEST 2015 on sn-devel-104

8 years agopytevent: Port to Python 3
Petr Viktorin [Fri, 22 May 2015 09:47:56 +0000 (11:47 +0200)]
pytevent: Port to Python 3

- Use PyStr (String on py2, Unicode on py3) for text strings
- Use PyLong instead of PyInt on Python 3
- Use new module initialization

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
8 years agopytalloc: Improve timer wrapper, and test it
Petr Viktorin [Tue, 26 May 2015 11:25:12 +0000 (13:25 +0200)]
pytalloc: Improve timer wrapper, and test it

Using Context.add_timer resulted in crashes due to missing type object
and bad reference handling.
Add a TeventTimer_Type struct, and introduce a clear ownership/lifetime model.

Add a "add_timer_offset" to allow adding timers from Python. (add_timer
requires passing struct timeval as a Python integer, which can't really
be done portably).

Add tests.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
8 years agopytevent: Define missing TeventFd_Type object
Petr Viktorin [Fri, 22 May 2015 11:29:11 +0000 (13:29 +0200)]
pytevent: Define missing TeventFd_Type object

The type objects for Fd was declared but never defined,
resulting in segfaults when it was used.
Define it.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
8 years agopytevent: Better error and reference handling
Petr Viktorin [Thu, 4 Dec 2014 11:44:56 +0000 (12:44 +0100)]
pytevent: Better error and reference handling

py_backend_list:
- Handle cases of PyString_FromString or PyList_Append failing.
- Properly decrease the reference count of the returned strings.

py_register_backend:
- Decref "name" after use

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
8 years agobuildtools: Always reset the build environment
Petr Viktorin [Fri, 22 May 2015 11:06:48 +0000 (13:06 +0200)]
buildtools: Always reset the build environment

In install_library, the Build object's environment was not reset
after an early return, so the extrapython env would be used in
subsequent build steps.
Wrap everything in a try-finally block to make sure the env is reset.

(Almost all of the change is indentation, `git show -w` recommended.)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
8 years agos3: libsmbclient: Use cache targetcli in SMBC_splice_ctx calls also.
Jeremy Allison [Mon, 8 Jun 2015 17:07:49 +0000 (10:07 -0700)]
s3: libsmbclient: Use cache targetcli in SMBC_splice_ctx calls also.

Bug 11295 - Excessive cli_resolve_path() usage can slow down transmission.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11295

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jun 10 04:09:36 CEST 2015 on sn-devel-104

8 years agosmbd/trans2: add a useful diagnostic for files with bad encoding
Ralph Boehme [Wed, 3 Jun 2015 15:07:46 +0000 (17:07 +0200)]
smbd/trans2: add a useful diagnostic for files with bad encoding

Catch conversion error and log the path of the offending file.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun  9 21:00:02 CEST 2015 on sn-devel-104

8 years agolib/util/charset: fix conversion failure logging
Ralph Boehme [Wed, 3 Jun 2015 14:58:22 +0000 (16:58 +0200)]
lib/util/charset: fix conversion failure logging

Move catch-all debug statement with loglevel 0 from behind the switch
clause into the switch clause as default case. Fixes an issue that
resulted in the log being flooded with level 0 messages in case someone
put a file with an illegal UTF8 encoding (eg '\xA0test') on the server.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs_fruit: add option veto_appledouble
Ralph Boehme [Sat, 9 May 2015 06:31:24 +0000 (08:31 +0200)]
vfs_fruit: add option veto_appledouble

vfs_fruit adds a wildcard path "._*" to the vetolist in order to prevent
client access to ._ AppleDouble files created internally by vfs_fruit
for storing the Mac resource fork stream.

Unfortunately there are legitimite use cases where an OS X client may
want to use such filenames, extracting ZIP archives (where the archive
contains ._ files) being one of them.

A possible simple solution to this problem would be to not veto ._ files
in the first place, even though that exposes internally created ._ files
which the client shouldn't be able to access.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11305

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jun  9 14:48:14 CEST 2015 on sn-devel-104

8 years agos3:param/loadparm fix testparm --show-all-parameters
Christian Ambach [Mon, 8 Jun 2015 21:48:54 +0000 (23:48 +0200)]
s3:param/loadparm fix testparm --show-all-parameters

it didn't know about the new types of config parameters

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11170

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun  9 11:49:18 CEST 2015 on sn-devel-104

8 years agonsswitch: Simplify winbind_named_pipe_sock()
Volker Lendecke [Sun, 1 Mar 2015 11:43:01 +0000 (11:43 +0000)]
nsswitch: Simplify winbind_named_pipe_sock()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jun  8 19:48:18 CEST 2015 on sn-devel-104

8 years agoctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build.
Stefan Metzmacher [Thu, 28 May 2015 14:17:15 +0000 (16:17 +0200)]
ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build.

This avoids rebuilding ctdb after each commit, instead we're using
SAMBA_VERSION_STRING, which may contain "4.3.0pre1-DEVELOPERBUILD",
instead of "4.3.0pre1.GIT.4ccdd39" for the non-install build.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jun  8 15:51:46 CEST 2015 on sn-devel-104

8 years agoctdb-build: fix version handling in standalone build
Michael Adam [Mon, 8 Jun 2015 10:47:34 +0000 (12:47 +0200)]
ctdb-build: fix version handling in standalone build

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

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoselftest: Remove binary mappings from the build system.
Adrian Cochrane [Fri, 5 Jun 2015 00:22:45 +0000 (12:22 +1200)]
selftest: Remove binary mappings from the build system.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoselftest: Apply rename filepath arguments so binary mapping doesn't have to.
Adrian Cochrane [Fri, 5 Jun 2015 03:18:19 +0000 (15:18 +1200)]
selftest: Apply rename filepath arguments so binary mapping doesn't have to.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos3:smb2_tcon: require a signed request when authentication is used for SMB >= 3.11
Stefan Metzmacher [Thu, 28 May 2015 13:35:25 +0000 (15:35 +0200)]
s3:smb2_tcon: require a signed request when authentication is used for SMB >= 3.11

Disconnect the client if the request is not signed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  6 03:19:33 CEST 2015 on sn-devel-104

8 years agoctdb: Change use of 'which' to 'type' in scripts.
Jose A. Rivera [Fri, 5 Jun 2015 14:20:59 +0000 (09:20 -0500)]
ctdb: Change use of 'which' to 'type' in scripts.

While 'which' is a very common tool, on many distros it is not a requirement
that it be installed. 'type' is a shell built-in specified by the Open Group,
and is found in shells like bash, dash, and ksh across multiple OSes.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun  5 20:39:47 CEST 2015 on sn-devel-104

8 years agomessaging: Move parsing of ctdb_req_message to ctdbd_conn.c
Volker Lendecke [Tue, 2 Jun 2015 20:30:06 +0000 (20:30 +0000)]
messaging: Move parsing of ctdb_req_message to ctdbd_conn.c

This way we can remove the ctdb-specific includes from messages_ctdbd.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agowinbind: Lookup groupmem via primaryGroupID
Volker Lendecke [Fri, 5 Jun 2015 11:02:10 +0000 (13:02 +0200)]
winbind: Lookup groupmem via primaryGroupID

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jun  5 17:21:04 CEST 2015 on sn-devel-104

8 years agotsocket: Use common code in tsocket_bsd_common_prepare_fd
Volker Lendecke [Fri, 5 Jun 2015 09:02:45 +0000 (11:02 +0200)]
tsocket: Use common code in tsocket_bsd_common_prepare_fd

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
8 years agolibcli/named_pipe_auth: call smb_set_close_on_exec() in tstream_npa_socketpair()
Stefan Metzmacher [Fri, 5 Jun 2015 07:40:19 +0000 (09:40 +0200)]
libcli/named_pipe_auth: call smb_set_close_on_exec() in tstream_npa_socketpair()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11312

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agodocs: Reference ldap ssl options in idmap_rfc2307 manpage
Christof Schmitt [Thu, 4 Jun 2015 20:28:55 +0000 (13:28 -0700)]
docs: Reference ldap ssl options in idmap_rfc2307 manpage

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun  5 14:18:01 CEST 2015 on sn-devel-104

8 years agos3: libsmbclient: Re-resolving targetcli on every read/write/lseek/ftruncate/close...
Jeremy Allison [Thu, 28 May 2015 18:07:41 +0000 (11:07 -0700)]
s3: libsmbclient: Re-resolving targetcli on every read/write/lseek/ftruncate/close is both incorrect and slow.

Cache targetcli on file open in the SMBCFILE struct.

Bug 11295 - Excessive cli_resolve_path() usage can slow down transmission.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11295

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-recovered: Drop unused variable
Amitay Isaacs [Fri, 5 Jun 2015 06:36:08 +0000 (16:36 +1000)]
ctdb-recovered: Drop unused variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-recoverd/vacuum: Remove vacuum_info structure
Amitay Isaacs [Fri, 5 Jun 2015 06:35:48 +0000 (16:35 +1000)]
ctdb-recoverd/vacuum: Remove vacuum_info structure

For all the records listed in VACUUM_FETCH, migration requests are sent
immediately without waiting.  This means there can only be a single
VACUUM_FETCH processing active at a time.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-recoverd/vacuum: move fetch loop back into fetch handler.
Michael Adam [Tue, 2 Jun 2015 20:17:03 +0000 (22:17 +0200)]
ctdb-recoverd/vacuum: move fetch loop back into fetch handler.

With the processing of one element factored out,
it is more natural to have the actual loop inside the
handler function. This also makes the talloc/free
bracked around the loop more obvious.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-recoverd/vacuum: slightly reorder the vacuum fetch loop
Michael Adam [Tue, 2 Jun 2015 20:16:17 +0000 (22:16 +0200)]
ctdb-recoverd/vacuum: slightly reorder the vacuum fetch loop

Reads more naturally this way, imho.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-recoverd/vacuum: add common exit point to vacuum_fetch_handler
Michael Adam [Tue, 2 Jun 2015 19:57:54 +0000 (21:57 +0200)]
ctdb-recoverd/vacuum: add common exit point to vacuum_fetch_handler

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-recoverd/vacuum: factor vacuum_fetch_process_one out of vacuum_fetch_loop
Michael Adam [Tue, 2 Jun 2015 19:39:00 +0000 (21:39 +0200)]
ctdb-recoverd/vacuum: factor vacuum_fetch_process_one out of vacuum_fetch_loop

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-recoverd/vacuum: move two variables into scope.
Michael Adam [Tue, 2 Jun 2015 19:27:16 +0000 (21:27 +0200)]
ctdb-recoverd/vacuum: move two variables into scope.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-recoverd/vacuum: remove unneeded prototype.
Michael Adam [Wed, 27 May 2015 23:06:25 +0000 (01:06 +0200)]
ctdb-recoverd/vacuum: remove unneeded prototype.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agonsswitch: Extend idmap_rfc2307 testcase for reverse lookup
Christof Schmitt [Thu, 4 Jun 2015 17:39:14 +0000 (10:39 -0700)]
nsswitch: Extend idmap_rfc2307 testcase for reverse lookup

Also test the codepaths to map UID and GID back to SID and names. Use
different user and group to avoid returning results cached from the
previous lookups.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11313

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): Fri Jun  5 01:24:32 CEST 2015 on sn-devel-104

8 years agoidmap_rfc2307: Fix wbinfo --gid-to-sid query
Christof Schmitt [Thu, 4 Jun 2015 19:11:27 +0000 (12:11 -0700)]
idmap_rfc2307: Fix wbinfo --gid-to-sid query

Fix syntax error in LDAP query for gidNumber.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11313

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos3-rpc_server: Fix inteface typo.
Günther Deschner [Wed, 3 Jun 2015 11:33:00 +0000 (13:33 +0200)]
s3-rpc_server: Fix inteface typo.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun  4 03:51:29 CEST 2015 on sn-devel-104

8 years agotstream: Make socketpair nonblocking
Volker Lendecke [Wed, 3 Jun 2015 13:41:24 +0000 (13:41 +0000)]
tstream: Make socketpair nonblocking

When we have a large RPC reply, we can't block in the RPC server.

Test: Do rpcclient netshareenumall with a thousand shares defined

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodebug: Fix default log levels
Volker Lendecke [Wed, 3 Jun 2015 14:34:31 +0000 (14:34 +0000)]
debug: Fix default log levels

According to man smb.conf, the log level with the "logging=" parameter is
separated by @, not :.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Jun  4 01:01:35 CEST 2015 on sn-devel-104

8 years agoPrevent clashes between system and Samba SHA functions
Emmanuel Dreyfus [Sat, 30 May 2015 05:31:01 +0000 (07:31 +0200)]
Prevent clashes between system and Samba SHA functions

Samba provides its own set of SHA function, which would replace
libc-provided flavors. This is a problem because while the prototypes
are the same, the context structure are different. As a result,
when connecting to a LDAP/SSL directory, we go through
libldap/libssl/libcrypto and there libcrypto expects to call libc
SHA functions, not Samba's.

The fix is to check for SHA function presence and rename Samba's
version to avoid a clash.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo <simo@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun  3 01:54:24 CEST 2015 on sn-devel-104

8 years agotevent: fix access after free in tevent_common_check_signal()
Stefan Metzmacher [Tue, 2 Jun 2015 10:18:22 +0000 (12:18 +0200)]
tevent: fix access after free in tevent_common_check_signal()

This was reported by Pavel Březina <pbrezina@redhat.com>:

    We found a crash in SSSD when a tevent signal is freed in its handler, tevent
    than crashes when it access siginfo.

    sig_info is freed in signal destructor:

    > #ifdef SA_SIGINFO
    >         if (se->sa_flags & SA_SIGINFO) {
    >             if (sig_state->sig_info[se->signum]) {
    >                 talloc_free(sig_state->sig_info[se->signum]);
    >                 sig_state->sig_info[se->signum] = NULL;
    >             }
    >         }
    > #endif

    (gdb) bt
    #0  0x00007f5d4d86cc74 in tevent_signal_destructor (se=0x7f5d5370f920) at
    ../tevent_signal.c:213
    #1  0x00007f5d4d65f233 in _talloc_free_internal () from /lib64/libtalloc.so.2
    #2  0x00007f5d4d6593a3 in _talloc_free () from /lib64/libtalloc.so.2
    #3  0x00007f5d4342f3d4 in proxy_child_init_done (subreq=0x7f5d5370f600) at
    src/providers/proxy/proxy_auth.c:436
    #4  0x00007f5d4d86b0c2 in _tevent_req_error (req=req@entry=0x7f5d5370f600,
    error=error@entry=5, location=location@entry=0x7f5d43433010
    "src/providers/proxy/proxy_auth.c:356")
        at ../tevent_req.c:167
    #5  0x00007f5d4342ef5e in pc_init_sig_handler (ev=<optimized out>,
    sige=<optimized out>, signum=<optimized out>, count=<optimized out>,
    __siginfo=<optimized out>, pvt=<optimized out>)
        at src/providers/proxy/proxy_auth.c:356
    #6  0x00007f5d4d86d48c in tevent_common_check_signal (ev=0x7f5d536de670) at
    ../tevent_signal.c:428
    #7  0x00007f5d4d86f28c in epoll_event_loop (tvalp=0x7fff7b568490,
    epoll_ev=0x7f5d536de8b0) at ../tevent_epoll.c:647
    #8  epoll_event_loop_once (ev=<optimized out>, location=<optimized out>) at
    ../tevent_epoll.c:926
    #9  0x00007f5d4d86d7d7 in std_event_loop_once (ev=0x7f5d536de670,
    location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent_standard.c:114
    #10 0x00007f5d4d869fbd in _tevent_loop_once (ev=ev@entry=0x7f5d536de670,
    location=location@entry=0x7f5d50faedc3 "src/util/server.c:668") at
    ../tevent.c:530
    #11 0x00007f5d4d86a15b in tevent_common_loop_wait (ev=0x7f5d536de670,
    location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent.c:634
    #12 0x00007f5d4d86d777 in std_event_loop_wait (ev=0x7f5d536de670,
    location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent_standard.c:140
    #13 0x00007f5d50f96863 in server_loop (main_ctx=0x7f5d536dfac0) at
    src/util/server.c:668
    #14 0x00007f5d5180aa42 in main (argc=8, argv=<optimized out>) at
    src/providers/data_provider_be.c:2909

    But then it is accessed again in tevent_common_check_signal:

    > #ifdef SA_SIGINFO
    >         if (clear_processed_siginfo) {
    >             uint32_t j;
    >             for (j=0;j<count;j++) {
    >                 uint32_t ofs = (counter.seen + j)
    >                     % TEVENT_SA_INFO_QUEUE_COUNT;
    >                 memset((void*)&sig_state->sig_info[i][ofs],
    >                     '\0',
    >                     sizeof(siginfo_t));
    >             }
    >         }
    > #endif

    (gdb) bt
    #0  0x00007fd7ba400505 in memset (__len=<optimized out>, __ch=<optimized out>,
    __dest=<optimized out>) at /usr/include/bits/string3.h:84
    #1  tevent_common_check_signal (ev=0x7fd7bfddf670) at ../tevent_signal.c:459
    #2  0x00007fd7ba40228c in epoll_event_loop (tvalp=0x7fff85536430,
    epoll_ev=0x7fd7bfddf8b0) at ../tevent_epoll.c:647
    #3  epoll_event_loop_once (ev=<optimized out>, location=<optimized out>) at
    ../tevent_epoll.c:926
    #4  0x00007fd7ba4007d7 in std_event_loop_once (ev=0x7fd7bfddf670,
    location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent_standard.c:114
    #5  0x00007fd7ba3fcfbd in _tevent_loop_once (ev=ev@entry=0x7fd7bfddf670,
    location=location@entry=0x7fd7bdb417c3 "src/util/server.c:668") at
    ../tevent.c:530
    #6  0x00007fd7ba3fd15b in tevent_common_loop_wait (ev=0x7fd7bfddf670,
    location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent.c:634
    #7  0x00007fd7ba400777 in std_event_loop_wait (ev=0x7fd7bfddf670,
    location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent_standard.c:140
    #8  0x00007fd7bdb29343 in server_loop (main_ctx=0x7fd7bfde0ac0) at
    src/util/server.c:668
    #9  0x00007fd7be39ca42 in main (argc=8, argv=<optimized out>) at
    src/providers/data_provider_be.c:2909

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11308

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun  2 21:02:11 CEST 2015 on sn-devel-104

8 years agos4-torture: call clusapi_CreateResEnum for all cluster resources.
Günther Deschner [Thu, 23 Apr 2015 09:44:43 +0000 (11:44 +0200)]
s4-torture: call clusapi_CreateResEnum for all cluster resources.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun  2 05:16:00 CEST 2015 on sn-devel-104

8 years agoclusapi: add inline comment describing why we use so many "if 0" in this IDL.
Günther Deschner [Fri, 22 May 2015 08:59:03 +0000 (10:59 +0200)]
clusapi: add inline comment describing why we use so many "if 0" in this IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoKCC: improve docstring for KCC.load_samdb()
Douglas Bagnall [Wed, 29 Apr 2015 23:34:21 +0000 (11:34 +1200)]
KCC: improve docstring for KCC.load_samdb()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat May 30 23:55:22 CEST 2015 on sn-devel-104

8 years agoKCC: improve docstring for KCC.list_dsas()
Douglas Bagnall [Wed, 29 Apr 2015 23:33:59 +0000 (11:33 +1200)]
KCC: improve docstring for KCC.list_dsas()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: slightly improve docstring for KCC.create_connection()
Douglas Bagnall [Mon, 27 Apr 2015 23:32:27 +0000 (11:32 +1200)]
KCC: slightly improve docstring for KCC.create_connection()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.is_bridgehead_failed()
Douglas Bagnall [Mon, 27 Apr 2015 23:31:51 +0000 (11:31 +1200)]
KCC: improve docstring for KCC.is_bridgehead_failed()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Slightly improve docstring for KCC.get_all_bridgeheads()
Douglas Bagnall [Mon, 27 Apr 2015 23:30:30 +0000 (11:30 +1200)]
KCC: Slightly improve docstring for KCC.get_all_bridgeheads()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Slightly improve docstring for KCC.get_bridgehead()
Douglas Bagnall [Mon, 27 Apr 2015 23:29:47 +0000 (11:29 +1200)]
KCC: Slightly improve docstring for KCC.get_bridgehead()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_all_partitions()
Douglas Bagnall [Mon, 27 Apr 2015 23:22:40 +0000 (11:22 +1200)]
KCC: improve docstring for KCC.load_all_partitions()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.add_transports()
Douglas Bagnall [Mon, 27 Apr 2015 23:14:04 +0000 (11:14 +1200)]
KCC: improve docstring for KCC.add_transports()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.setup_graph()
Douglas Bagnall [Mon, 27 Apr 2015 23:13:23 +0000 (11:13 +1200)]
KCC: improve docstring for KCC.setup_graph()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.translate_ntdsconn()
Douglas Bagnall [Mon, 27 Apr 2015 23:11:43 +0000 (11:11 +1200)]
KCC: improve docstring for KCC.translate_ntdsconn()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.modify_repsFrom()
Douglas Bagnall [Mon, 27 Apr 2015 23:10:46 +0000 (11:10 +1200)]
KCC: improve docstring for KCC.modify_repsFrom()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.is_stale_link_connection()
Douglas Bagnall [Mon, 27 Apr 2015 23:06:58 +0000 (11:06 +1200)]
KCC: improve docstring for KCC.is_stale_link_connection()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.merge_failed_links()
Douglas Bagnall [Mon, 27 Apr 2015 23:05:06 +0000 (11:05 +1200)]
KCC: improve docstring for KCC.merge_failed_links()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring and comment for kcc.remove_unneeded_ntdsconn()
Douglas Bagnall [Mon, 27 Apr 2015 23:01:13 +0000 (11:01 +1200)]
KCC: improve docstring and comment for kcc.remove_unneeded_ntdsconn()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_my_dsa()
Douglas Bagnall [Fri, 24 Apr 2015 04:56:36 +0000 (16:56 +1200)]
KCC: improve docstring for KCC.load_my_dsa()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_my_site()
Douglas Bagnall [Fri, 24 Apr 2015 04:56:05 +0000 (16:56 +1200)]
KCC: improve docstring for KCC.load_my_site()

Separating :return: from :raise:

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_mysite()
Douglas Bagnall [Fri, 24 Apr 2015 04:54:35 +0000 (16:54 +1200)]
KCC: improve docstring for KCC.load_mysite()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring and comments for KCC.load_site()
Douglas Bagnall [Fri, 24 Apr 2015 04:53:35 +0000 (16:53 +1200)]
KCC: improve docstring and comments for KCC.load_site()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_all_sitelinks()
Douglas Bagnall [Fri, 24 Apr 2015 04:52:59 +0000 (16:52 +1200)]
KCC: improve docstring for KCC.load_all_sitelinks()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for KCC.load_all_transports()
Douglas Bagnall [Fri, 24 Apr 2015 04:52:33 +0000 (16:52 +1200)]
KCC: improve docstring for KCC.load_all_transports()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for the KCC class
Douglas Bagnall [Fri, 24 Apr 2015 04:51:33 +0000 (16:51 +1200)]
KCC: docstring for the KCC class

The params describe the __init__ method arguments.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve docstring for is_smtp_replication_available()
Douglas Bagnall [Fri, 24 Apr 2015 04:48:51 +0000 (16:48 +1200)]
KCC: improve docstring for is_smtp_replication_available()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for sort_dsa_by_gc_and_guid
Douglas Bagnall [Fri, 24 Apr 2015 04:48:08 +0000 (16:48 +1200)]
KCC: docstring for sort_dsa_by_gc_and_guid

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Docstring for sort_replica_by_dsa_guid
Douglas Bagnall [Fri, 24 Apr 2015 04:47:36 +0000 (16:47 +1200)]
KCC: Docstring for sort_replica_by_dsa_guid

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: tests/ldif_utils tests ldif import
Douglas Bagnall [Thu, 16 Apr 2015 05:26:51 +0000 (17:26 +1200)]
KCC: tests/ldif_utils tests ldif import

Thanks as usual to Andrew Bartlett for his help.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: ldif_utils: ldif_to_samdb doesn't need creds; begin selftest
Douglas Bagnall [Mon, 27 Apr 2015 23:38:51 +0000 (11:38 +1200)]
KCC: ldif_utils: ldif_to_samdb doesn't need creds; begin selftest

The tests are based on the testdata/ldif-utils-test-multisite.ldif
which describes a multisite windows network. It was constructed by
Garming Sam.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: add multisite ldif file for KCC tests
Douglas Bagnall [Mon, 27 Apr 2015 23:39:49 +0000 (11:39 +1200)]
KCC: add multisite ldif file for KCC tests

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agokcc: translate over other DSA for repsFrom graph
Garming Sam [Fri, 10 Apr 2015 04:17:28 +0000 (16:17 +1200)]
kcc: translate over other DSA for repsFrom graph

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agokcc: prevent non-determinism when running translation
Garming Sam [Fri, 10 Apr 2015 04:15:28 +0000 (16:15 +1200)]
kcc: prevent non-determinism when running translation

RODC connections could appear first some runs while not always. This would
mean that repsFrom could accidentally be deleted.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoctdb: remove various dead prototypes from the ctdb private header.
Günther Deschner [Wed, 27 May 2015 17:01:55 +0000 (19:01 +0200)]
ctdb: remove various dead prototypes from the ctdb private header.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat May 30 05:03:59 CEST 2015 on sn-devel-104

8 years agoctdb: remove various dead prototypes from the ctdb client header.
Günther Deschner [Wed, 27 May 2015 14:34:48 +0000 (16:34 +0200)]
ctdb: remove various dead prototypes from the ctdb client header.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos3:smb2_server: In CCM and GCM mode we can't reuse nonces
Simo Sorce [Wed, 20 May 2015 12:01:44 +0000 (14:01 +0200)]
s3:smb2_server: In CCM and GCM mode we can't reuse nonces

Reuse of nonces with AES-CCM and AES-GCM leads to catastrophic failure,
so make sure the server drops the connection if that ever happens.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11300

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

Signed-off-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri May 29 22:38:50 CEST 2015 on sn-devel-104

8 years agolibcli/smb: In CCM and GCM mode we can't reuse nonces
Stefan Metzmacher [Thu, 28 May 2015 13:20:54 +0000 (15:20 +0200)]
libcli/smb: In CCM and GCM mode we can't reuse nonces

Reuse of nonces with AES-CCM and AES-GCM leads to catastrophic failure,
so make sure the server drops the connection if that ever happens.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11300

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
8 years agoctdbd_conn: Fix CID 1301580 Explicit null dereferenced
Volker Lendecke [Thu, 23 Apr 2015 16:06:17 +0000 (18:06 +0200)]
ctdbd_conn: Fix CID 1301580 Explicit null dereferenced

Coverity does not really tell me which code path it sees where we could leave
hdr==NULL, but this check does not hurt.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 29 19:49:30 CEST 2015 on sn-devel-104

8 years agoKCC: test suite for the graph_utils
Douglas Bagnall [Tue, 14 Apr 2015 02:46:12 +0000 (14:46 +1200)]
KCC: test suite for the graph_utils

This found a few bugs in the tests which were fixed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 29 13:55:54 CEST 2015 on sn-devel-104

8 years agoKCC: rename 'repsFrom_%s_all' graphs --> 'all-repsFrom_%s' for better sort order
Douglas Bagnall [Tue, 14 Apr 2015 02:35:15 +0000 (14:35 +1200)]
KCC: rename 'repsFrom_%s_all' graphs --> 'all-repsFrom_%s' for better sort order

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: more debugging changes
Douglas Bagnall [Tue, 14 Apr 2015 02:31:05 +0000 (14:31 +1200)]
KCC: more debugging changes

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: (doc) explain intrasite max edge count a bit better
Douglas Bagnall [Mon, 13 Apr 2015 22:12:48 +0000 (10:12 +1200)]
KCC: (doc) explain intrasite max edge count a bit better

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove print statements from kcc_utils
Douglas Bagnall [Thu, 9 Apr 2015 03:04:44 +0000 (15:04 +1200)]
KCC: remove print statements from kcc_utils

debug noise should not go to stdout

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: pep8/flake8 fixes for samba_kcc
Douglas Bagnall [Thu, 9 Apr 2015 03:02:00 +0000 (15:02 +1200)]
KCC: pep8/flake8 fixes for samba_kcc

Also note a couple of unused variables. I am not removing them yet
in case their intended use turns up.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>