samba.git
2 years agos3:waf: Reformat smbspool_krb5_wrapper
Andreas Schneider [Tue, 22 Nov 2016 10:00:37 +0000 (11:00 +0100)]
s3:waf: Reformat smbspool_krb5_wrapper

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbspool
Andreas Schneider [Tue, 22 Nov 2016 10:00:20 +0000 (11:00 +0100)]
s3:waf: Reformat smbspool

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbclient
Andreas Schneider [Tue, 22 Nov 2016 10:00:00 +0000 (11:00 +0100)]
s3:waf: Reformat smbclient

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat cli_spoolss
Andreas Schneider [Tue, 22 Nov 2016 09:59:14 +0000 (10:59 +0100)]
s3:waf: Reformat cli_spoolss

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat libcli_netlogon3
Andreas Schneider [Tue, 22 Nov 2016 09:58:28 +0000 (10:58 +0100)]
s3:waf: Reformat libcli_netlogon3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat errors3
Andreas Schneider [Tue, 22 Nov 2016 09:57:22 +0000 (10:57 +0100)]
s3:waf: Reformat errors3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat CHARSET3
Andreas Schneider [Tue, 22 Nov 2016 09:56:57 +0000 (10:56 +0100)]
s3:waf: Reformat CHARSET3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat samba3-util
Andreas Schneider [Tue, 22 Nov 2016 09:56:00 +0000 (10:56 +0100)]
s3:waf: Reformat samba3-util

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat trusts_util
Andreas Schneider [Tue, 22 Nov 2016 09:55:24 +0000 (10:55 +0100)]
s3:waf: Reformat trusts_util

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat DCUTIL
Andreas Schneider [Tue, 22 Nov 2016 09:54:41 +0000 (10:54 +0100)]
s3:waf: Reformat DCUTIL

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat SLCACHE
Andreas Schneider [Tue, 22 Nov 2016 09:54:14 +0000 (10:54 +0100)]
s3:waf: Reformat SLCACHE

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat PASSCHANGE
Andreas Schneider [Tue, 22 Nov 2016 09:53:39 +0000 (10:53 +0100)]
s3:waf: Reformat PASSCHANGE

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat PLAINTEXT_AUTH
Andreas Schneider [Tue, 22 Nov 2016 09:53:15 +0000 (10:53 +0100)]
s3:waf: Reformat PLAINTEXT_AUTH

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat SERVICES
Andreas Schneider [Tue, 22 Nov 2016 09:52:35 +0000 (10:52 +0100)]
s3:waf: Reformat SERVICES

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat LIBNMB
Andreas Schneider [Tue, 22 Nov 2016 09:51:49 +0000 (10:51 +0100)]
s3:waf: Reformat LIBNMB

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat LIBNET_SAMSYNC
Andreas Schneider [Tue, 22 Nov 2016 09:51:12 +0000 (10:51 +0100)]
s3:waf: Reformat LIBNET_SAMSYNC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat LIBNET_DSSYNC
Andreas Schneider [Tue, 22 Nov 2016 09:50:39 +0000 (10:50 +0100)]
s3:waf: Reformat LIBNET_DSSYNC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat PRINTING
Andreas Schneider [Tue, 22 Nov 2016 09:49:59 +0000 (10:49 +0100)]
s3:waf: Reformat PRINTING

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat printing_migrate
Andreas Schneider [Tue, 22 Nov 2016 09:49:25 +0000 (10:49 +0100)]
s3:waf: Reformat printing_migrate

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat PRINTBACKEND
Andreas Schneider [Tue, 22 Nov 2016 09:48:35 +0000 (10:48 +0100)]
s3:waf: Reformat PRINTBACKEND

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat PRINTBASE
Andreas Schneider [Tue, 22 Nov 2016 09:47:54 +0000 (10:47 +0100)]
s3:waf: Reformat PRINTBASE

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat LOCKING
Andreas Schneider [Tue, 22 Nov 2016 09:47:18 +0000 (10:47 +0100)]
s3:waf: Reformat LOCKING

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbd_base
Andreas Schneider [Tue, 22 Nov 2016 09:46:49 +0000 (10:46 +0100)]
s3:waf: Reformat smbd_base

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbconf
Andreas Schneider [Tue, 22 Nov 2016 09:45:36 +0000 (10:45 +0100)]
s3:waf: Reformat smbconf

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat ads
Andreas Schneider [Tue, 22 Nov 2016 09:44:41 +0000 (10:44 +0100)]
s3:waf: Reformat ads

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat secrets3
Andreas Schneider [Tue, 22 Nov 2016 09:43:28 +0000 (10:43 +0100)]
s3:waf: Reformat secrets3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat libsmb
Andreas Schneider [Tue, 22 Nov 2016 09:39:40 +0000 (10:39 +0100)]
s3:waf: Reformat libsmb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat samba3core
Andreas Schneider [Tue, 22 Nov 2016 09:38:43 +0000 (10:38 +0100)]
s3:waf: Reformat samba3core

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat messages_dgm
Andreas Schneider [Tue, 22 Nov 2016 09:37:47 +0000 (10:37 +0100)]
s3:waf: Reformat messages_dgm

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat TDB_LIB
Andreas Schneider [Tue, 22 Nov 2016 09:37:11 +0000 (10:37 +0100)]
s3:waf: Reformat TDB_LIB

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat samba3-util
Andreas Schneider [Tue, 22 Nov 2016 09:36:25 +0000 (10:36 +0100)]
s3:waf: Reformat samba3-util

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat REG_FULL
Andreas Schneider [Tue, 22 Nov 2016 09:35:12 +0000 (10:35 +0100)]
s3:waf: Reformat REG_FULL

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat REG_SMBCONF
Andreas Schneider [Tue, 22 Nov 2016 09:34:33 +0000 (10:34 +0100)]
s3:waf: Reformat REG_SMBCONF

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbregistry
Andreas Schneider [Tue, 22 Nov 2016 09:33:30 +0000 (10:33 +0100)]
s3:waf: Reformat smbregistry

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat param
Andreas Schneider [Tue, 22 Nov 2016 09:32:10 +0000 (10:32 +0100)]
s3:waf: Reformat param

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat smbldaphelper
Andreas Schneider [Tue, 22 Nov 2016 09:30:53 +0000 (10:30 +0100)]
s3:waf: Reformat smbldaphelper

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat pdb
Andreas Schneider [Tue, 22 Nov 2016 09:30:21 +0000 (10:30 +0100)]
s3:waf: Reformat pdb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat samba-passdb
Andreas Schneider [Tue, 22 Nov 2016 09:28:58 +0000 (10:28 +0100)]
s3:waf: Reformat samba-passdb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat TLDAP
Andreas Schneider [Tue, 22 Nov 2016 09:27:33 +0000 (10:27 +0100)]
s3:waf: Reformat TLDAP

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat GROUPDB
Andreas Schneider [Tue, 22 Nov 2016 09:26:39 +0000 (10:26 +0100)]
s3:waf: Reformat GROUPDB

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat AVAHI
Andreas Schneider [Tue, 22 Nov 2016 09:26:08 +0000 (10:26 +0100)]
s3:waf: Reformat AVAHI

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat gpo
Andreas Schneider [Tue, 22 Nov 2016 09:25:07 +0000 (10:25 +0100)]
s3:waf: Reformat gpo

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agos3:waf: Reformat msrpc3
Andreas Schneider [Tue, 22 Nov 2016 09:24:14 +0000 (10:24 +0100)]
s3:waf: Reformat msrpc3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agolibsocket: Make sure ifr.ifr_name is null-terminated
Andreas Schneider [Wed, 22 Jun 2016 09:26:06 +0000 (11:26 +0200)]
libsocket: Make sure ifr.ifr_name is null-terminated

Found by Coverity

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec  3 03:40:53 CET 2016 on sn-devel-144

2 years agomanpages/vfs_fruit: add warning to fruit:resoure=stream
Ralph Boehme [Thu, 10 Nov 2016 08:07:41 +0000 (09:07 +0100)]
manpages/vfs_fruit: add warning to fruit:resoure=stream

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoWHATSNEW: document fruit:resource option spelling issue
Ralph Boehme [Thu, 10 Nov 2016 13:01:16 +0000 (14:01 +0100)]
WHATSNEW: document fruit:resource option spelling issue

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agovfs_fruit: fix fruit:resource option spelling
Ralph Boehme [Tue, 8 Nov 2016 11:35:12 +0000 (12:35 +0100)]
vfs_fruit: fix fruit:resource option spelling

Fix all occurences of bad spelling of "resource" as "res*s*ource" (two
s).

One of the places where this was wrong was when parsing parametric
options in the VFS connect() function in the module. As a result any
setting of

  fruit:resource=something

in smb.conf was silently ignored and the default ("file") was active.

In Samba 4.6 we accept both the wrong and the correct spelling, in Samba
4.7 the bad spelling will be removed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoutil: Initialize pointer
Andreas Schneider [Wed, 22 Jun 2016 07:36:00 +0000 (09:36 +0200)]
util: Initialize pointer

Coverity warns about so this will silence it.
Reviewed-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2 years agologon script: clarify usage for different Samba roles
Alexander Bokovoy [Thu, 10 Nov 2016 09:07:42 +0000 (11:07 +0200)]
logon script: clarify usage for different Samba roles

'logon script' is only used when Samba runs as a logon server in the
classical domain controller role. And even there 'ldapsam' passdb
backend will override it.

For Samba AD setup 'logon script' is not used at all.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3:libsmb: restructure cli_full_connection_creds* flow
Stefan Metzmacher [Fri, 4 Nov 2016 10:34:02 +0000 (11:34 +0100)]
s3:libsmb: restructure cli_full_connection_creds* flow

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec  2 17:32:26 CET 2016 on sn-devel-144

2 years agos3:libnet_join: make use of cli_full_connection_creds()
Stefan Metzmacher [Thu, 1 Dec 2016 15:37:43 +0000 (16:37 +0100)]
s3:libnet_join: make use of cli_full_connection_creds()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: change cli_full_connection_send/recv into cli_full_connection_creds_send...
Stefan Metzmacher [Wed, 26 Oct 2016 11:48:58 +0000 (13:48 +0200)]
s3:libsmb: change cli_full_connection_send/recv into cli_full_connection_creds_send/recv

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:winbindd: always use saf_store(domain->alt_name, controller) for ad domains
Stefan Metzmacher [Fri, 4 Nov 2016 11:56:20 +0000 (12:56 +0100)]
s3:winbindd: always use saf_store(domain->alt_name, controller) for ad domains

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agotests/libsmb_samba_internal.py: fully setup the Credentials by creds.guess(lp)
Stefan Metzmacher [Fri, 2 Dec 2016 09:23:28 +0000 (10:23 +0100)]
tests/libsmb_samba_internal.py: fully setup the Credentials by creds.guess(lp)

It's important that we correctly initialize domain and realm.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Remove a used-once variable
Volker Lendecke [Tue, 29 Nov 2016 16:11:59 +0000 (16:11 +0000)]
lib: Remove a used-once variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec  2 13:31:59 CET 2016 on sn-devel-144

2 years agolib: Fix a comment
Volker Lendecke [Tue, 29 Nov 2016 16:01:58 +0000 (16:01 +0000)]
lib: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Avoid includes.h in samlogon_cache.c
Volker Lendecke [Tue, 29 Nov 2016 15:59:21 +0000 (15:59 +0000)]
lib: Avoid includes.h in samlogon_cache.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Replace use of deprecated talloc_destroy
Volker Lendecke [Tue, 29 Nov 2016 15:56:19 +0000 (15:56 +0000)]
lib: Replace use of deprecated talloc_destroy

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Avoid fstring in samlogon_cache.c
Volker Lendecke [Tue, 29 Nov 2016 15:52:29 +0000 (15:52 +0000)]
lib: Avoid fstring in samlogon_cache.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Add samlogon_cache.h
Volker Lendecke [Tue, 29 Nov 2016 15:41:27 +0000 (15:41 +0000)]
lib: Add samlogon_cache.h

Move prototypes into its own header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Fix netsamlogon_cache_have for README.Coding
Volker Lendecke [Tue, 29 Nov 2016 15:20:14 +0000 (15:20 +0000)]
lib: Fix netsamlogon_cache_have for README.Coding

"False" should have gone long ago

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Delete unused netsamlogon_cache_shutdown
Volker Lendecke [Tue, 29 Nov 2016 14:58:51 +0000 (14:58 +0000)]
lib: Delete unused netsamlogon_cache_shutdown

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Delete an orphaned piece of code in samlogon_cache.c
Volker Lendecke [Tue, 29 Nov 2016 14:55:47 +0000 (14:55 +0000)]
lib: Delete an orphaned piece of code in samlogon_cache.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolib: Avoid includes.h in bitmap.c
Volker Lendecke [Sat, 26 Nov 2016 14:55:38 +0000 (15:55 +0100)]
lib: Avoid includes.h in bitmap.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoselftest: Do not include system krb5.conf in selftest
Andreas Schneider [Thu, 1 Dec 2016 07:18:58 +0000 (08:18 +0100)]
selftest: Do not include system krb5.conf in selftest

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 years agos3:libads: Include system /etc/krb5.conf if we use MIT Kerberos
Andreas Schneider [Wed, 23 Nov 2016 13:40:42 +0000 (14:40 +0100)]
s3:libads: Include system /etc/krb5.conf if we use MIT Kerberos

The system /etc/krb5.conf defines some defaults like:

    default_ccache_name = KEYRING:persistent:%{uid}

We need to respect that so should include it in our own created
krb5.conf file.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 years agos3:param: Add an 'include system krb5 conf' option
Andreas Schneider [Wed, 23 Nov 2016 13:39:47 +0000 (14:39 +0100)]
s3:param: Add an 'include system krb5 conf' option

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2 years agoctdb-tests: Use a separate directory for each local daemon
Martin Schwenke [Thu, 24 Nov 2016 05:37:26 +0000 (16:37 +1100)]
ctdb-tests: Use a separate directory for each local daemon

Separate directory contains configuration file, PID file, public
addresses file, socket, databases and log file.

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): Fri Dec  2 04:19:18 CET 2016 on sn-devel-144

2 years agoctdb-ipalloc: Optimise check to see if IP is available on a node
Martin Schwenke [Fri, 18 Nov 2016 05:08:13 +0000 (16:08 +1100)]
ctdb-ipalloc: Optimise check to see if IP is available on a node

Use a "bitmap" of available IPs for each IP address instead of walking
the list of available IP addresses.

For ctdb/tests/takeover/lcp2.030.sh, this improves the time taken on
my laptop from:

  real 0m11.997s
  user 0m11.960s
  sys 0m0.000s

to

  real 0m8.571s
  user 0m8.544s
  sys 0m0.000s

So, when assigning all 900 IP addresses the improvement is about 25%.

For the no-op case (where all IPs are already assigned to nodes), the
extra setup adds a small fraction of a second for 900 IPs.
Intermediate cases result in intermediate improvements.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-daemon: Exit early if there are trailing command-line arguments
Martin Schwenke [Sun, 27 Nov 2016 22:51:48 +0000 (09:51 +1100)]
ctdb-daemon: Exit early if there are trailing command-line arguments

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-daemon: Don't call ctdb_local_node_got_banned() on flag changes
Martin Schwenke [Tue, 8 Nov 2016 05:37:24 +0000 (16:37 +1100)]
ctdb-daemon: Don't call ctdb_local_node_got_banned() on flag changes

This function is currently called twice each time a node is banned.

ctdb_local_node_got_banned() is already called from the banning code,
either due to a received banning control or a node banning itself.
Given that other nodes can't set a node's BANNED flag, a node can only
be banned via the above mechanisms, so drop the redundant call.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agos3-libads: Fix canonicalization support with MIT Kerberos
Andreas Schneider [Mon, 15 Feb 2016 11:09:59 +0000 (12:09 +0100)]
s3-libads: Fix canonicalization support with MIT Kerberos

This allows to authenticate using user@DOMAIN against an AD DC.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec  2 00:23:02 CET 2016 on sn-devel-144

2 years agos3: libsmb: Setting the LIBSMBCLIENT_NO_CCACHE environment variable doesn't turn...
Jeremy Allison [Wed, 30 Nov 2016 18:25:53 +0000 (10:25 -0800)]
s3: libsmb: Setting the LIBSMBCLIENT_NO_CCACHE environment variable doesn't turn off credential cache use.

Signed-off-by: Jeremy Allison <jra@samba.org>
2 years agoreplace: Include libgen.h if available
Amitay Isaacs [Thu, 1 Dec 2016 01:12:47 +0000 (12:12 +1100)]
replace: Include libgen.h if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Dec  1 18:08:54 CET 2016 on sn-devel-144

2 years agosmbd: avoid extra churn on a debug print
Uri Simchoni [Thu, 1 Dec 2016 04:29:34 +0000 (06:29 +0200)]
smbd: avoid extra churn on a debug print

Remove the user / group name in debug-printing of a
POSIX-ACL-derived ACE.

Obtaining the user name might result an extra lookup
to the domain. In a typical case, a user raises logging
level to 10 to troubleshoot an issue, so connectivity
problems are likely to exist. In that case we won't want
the extra debug printing to create more issues.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2 years agoperf: Add simple tests for the open/close a database case
Andrew Bartlett [Mon, 17 Oct 2016 21:39:00 +0000 (10:39 +1300)]
perf: Add simple tests for the open/close a database case

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec  1 09:40:20 CET 2016 on sn-devel-144

2 years agoKCC: unconnected graph test
Clive Ferreira [Thu, 3 Nov 2016 23:31:09 +0000 (12:31 +1300)]
KCC: unconnected graph test

Uses a unconnected 5 DC single site database to test Douglas Bagnalls
patch which corrected a mix up between a str and an object which caused
infinite recursion and a method call on a None type.

This test patch originally triggered an edge case bug. This bug is
triggered by code to create additional edges which normally never ran.
In normal cases, the leftover connections made during a join would
prevent these additional edges from being created.

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoKCC: avoid infinite recursion when edgelist contains self
Douglas Bagnall [Wed, 2 Nov 2016 03:49:49 +0000 (16:49 +1300)]
KCC: avoid infinite recursion when edgelist contains self

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoKCC: Graphnode.add_edge_from expects dn strings, not objects
Douglas Bagnall [Wed, 2 Nov 2016 03:48:50 +0000 (16:48 +1300)]
KCC: Graphnode.add_edge_from expects dn strings, not objects

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: new ldb version 1.1.29 ldb-1.1.29
Andrew Bartlett [Mon, 28 Nov 2016 01:05:41 +0000 (14:05 +1300)]
ldb: new ldb version 1.1.29

 - new OID LDB_CONTROL_RECALCULATE_RDN_OID
 - honour LDB_CONTROL_RECALCULATE_RDN_OID in rdn_modify
 - fix handling of @ATTRIBUTES containing * in rdn_modify
 - improve startup performance on AD DC databases
  - These have lots of index attributes and attributes specified

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Add test for behaviour of rdn_name
Andrew Bartlett [Wed, 30 Nov 2016 23:11:46 +0000 (12:11 +1300)]
ldb: Add test for behaviour of rdn_name

Cover a wildcard in @ATTRIBUTES and the normal case.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Cope with a->name being *
Andrew Bartlett [Tue, 29 Nov 2016 03:20:07 +0000 (16:20 +1300)]
ldb: Cope with a->name being *

The default schema when loaded from the DB will have a name of *, not NULL.

This feature is rarely used, and was incompatible with the rdn_name module
until now.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb:rdn_name: add support for LDB_CONTROL_RECALCULATE_RDN_OID on ldb_modify()
Stefan Metzmacher [Thu, 10 Nov 2016 17:03:26 +0000 (18:03 +0100)]
ldb:rdn_name: add support for LDB_CONTROL_RECALCULATE_RDN_OID on ldb_modify()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb:rdn_name: normalize rdn_name in rdn_rename_callback()
Stefan Metzmacher [Thu, 10 Nov 2016 13:01:21 +0000 (14:01 +0100)]
ldb:rdn_name: normalize rdn_name in rdn_rename_callback()

We already do that on 'add'.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: load @ATTRIBUTES faster by sorting once, not at each insertion
Andrew Bartlett [Wed, 19 Oct 2016 00:24:36 +0000 (13:24 +1300)]
ldb: load @ATTRIBUTES faster by sorting once, not at each insertion

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Add helper function ldb_schema_attribute_fill_with_syntax()
Andrew Bartlett [Thu, 20 Oct 2016 03:01:42 +0000 (16:01 +1300)]
ldb: Add helper function ldb_schema_attribute_fill_with_syntax()

This will allow us to avoid calling ldb_schema_attribute_add_with_syntax()
in a tight loop.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Reduce per-attribute memory allocation during @ATTRIBUTES load
Andrew Bartlett [Fri, 14 Oct 2016 02:42:53 +0000 (15:42 +1300)]
ldb: Reduce per-attribute memory allocation during @ATTRIBUTES load

This means we do just a few allocations, not multiple per configured attribute (there can be 1000s)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Reduce scope of allocation and de-allocation of @ATTRIBUTES
Andrew Bartlett [Fri, 14 Oct 2016 02:35:46 +0000 (15:35 +1300)]
ldb: Reduce scope of allocation and de-allocation of @ATTRIBUTES

This memory does not need to be around long-term

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb: Add helper function ldb_schema_attribute_remove_flagged()
Andrew Bartlett [Thu, 20 Oct 2016 03:04:04 +0000 (16:04 +1300)]
ldb: Add helper function ldb_schema_attribute_remove_flagged()

This helps us avoid keeping a list of attributes to later remove on @ATTRIBUTES reload

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agoldb:controls: add LDB_CONTROL_RECALCULATE_RDN_OID
Stefan Metzmacher [Thu, 10 Nov 2016 17:01:47 +0000 (18:01 +0100)]
ldb:controls: add LDB_CONTROL_RECALCULATE_RDN_OID

This will be used by 'samba-tool dbcheck' to fix the rdn attribute name.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(Patch reduced by Andrew Bartlett to only allocate the OID)

2 years agoldb: Avoid individual memory allocations when searching for indexlist
Andrew Bartlett [Mon, 24 Oct 2016 21:56:43 +0000 (10:56 +1300)]
ldb: Avoid individual memory allocations when searching for indexlist

This reduces the talloc_free() cost when the ldb is terminated.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agodsdb: specify attributes when loading schema
Andrew Bartlett [Fri, 14 Oct 2016 02:43:46 +0000 (15:43 +1300)]
dsdb: specify attributes when loading schema

The LDB code performs better when the required attributes are listed, even when it is almost
all the attributes

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agopidl: Make static struct api_struct also const
Andrew Bartlett [Sun, 20 Nov 2016 22:58:07 +0000 (11:58 +1300)]
pidl: Make static struct api_struct also const

This moves the table to read-only memory

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agopidl: Change *_get_pipe_fns() to return const struct api_struct *
Andrew Bartlett [Sun, 20 Nov 2016 22:57:48 +0000 (11:57 +1300)]
pidl: Change *_get_pipe_fns() to return const struct api_struct *

This will allow the table to be made static const in the next commit

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agos4-rpc_server: Use an initialised static const struct in dcerpc_server_remote_init
Andrew Bartlett [Sun, 20 Nov 2016 22:42:30 +0000 (11:42 +1300)]
s4-rpc_server: Use an initialised static const struct in dcerpc_server_remote_init

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agos4-rpc_server: Use a type-safe struct signature in dcerpc_register_ep_server
Andrew Bartlett [Sun, 20 Nov 2016 22:39:16 +0000 (11:39 +1300)]
s4-rpc_server: Use a type-safe struct signature in dcerpc_register_ep_server

This is much safer than void *, and the void * feature appears no longer
to be needed after 31ded4901b4529ad2e49871502cab5ecba71483a

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agopidl: Use a static const initialised struct in dcerpc_server_$name_init(void)
Andrew Bartlett [Sun, 20 Nov 2016 22:38:24 +0000 (11:38 +1300)]
pidl: Use a static const initialised struct in dcerpc_server_$name_init(void)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agotorture: Remove access to LSARPC via \\pipe\netlogon in rpc.netlogon for ManyGetDCNam...
Andrew Bartlett [Wed, 9 Nov 2016 01:22:33 +0000 (14:22 +1300)]
torture: Remove access to LSARPC via \\pipe\netlogon in rpc.netlogon for ManyGetDCName test

This exploited the fact that we had \\pipe\lsass in both netlogon.idl and lsarpc.idl

To do this, we reset the binding to a new endpoint and reset the association group.

We add a new test specifically for this "feature" that we can knownfail if we
break it to add other new functionality.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agos4/rpc_server: Show what RPC interfaces are listening on which TCP port
Andrew Bartlett [Tue, 18 Oct 2016 23:45:05 +0000 (12:45 +1300)]
s4/rpc_server: Show what RPC interfaces are listening on which TCP port

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agotalloc: Add tests for talloc_parent() after realloc() of the parent
Andrew Bartlett [Sun, 27 Nov 2016 22:47:41 +0000 (11:47 +1300)]
talloc: Add tests for talloc_parent() after realloc() of the parent

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