samba.git
2 years agos3:nmbd: make use of cli_session_setup_anon()
Stefan Metzmacher [Fri, 28 Oct 2016 10:15:20 +0000 (12:15 +0200)]
s3:nmbd: make use of cli_session_setup_anon()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: make use of cli_session_setup_anon()
Stefan Metzmacher [Fri, 28 Oct 2016 10:15:20 +0000 (12:15 +0200)]
s3:libsmb: make use of cli_session_setup_anon()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: make cli_session_creds_init() non-static
Stefan Metzmacher [Fri, 28 Oct 2016 10:09:05 +0000 (12:09 +0200)]
s3:libsmb: make cli_session_creds_init() non-static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: add cli_session_setup_anon()
Stefan Metzmacher [Fri, 28 Oct 2016 10:01:50 +0000 (12:01 +0200)]
s3:libsmb: add cli_session_setup_anon()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: move domain\\username magic to cli_session_creds_init()
Stefan Metzmacher [Wed, 26 Oct 2016 10:41:10 +0000 (12:41 +0200)]
s3:libsmb: move domain\\username magic to cli_session_creds_init()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: get the plaintext and NTLM authentication details out of cli_credentials
Stefan Metzmacher [Wed, 26 Oct 2016 10:01:45 +0000 (12:01 +0200)]
s3:libsmb: get the plaintext and NTLM authentication details out of cli_credentials

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: move cli_session_creds_init() to cli_session_setup_send()
Stefan Metzmacher [Sat, 22 Oct 2016 09:24:48 +0000 (11:24 +0200)]
s3:libsmb: move cli_session_creds_init() to cli_session_setup_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: move cli_session_setup_get_account into cli_session_creds_init()
Stefan Metzmacher [Sat, 22 Oct 2016 09:00:39 +0000 (11:00 +0200)]
s3:libsmb: move cli_session_setup_get_account into cli_session_creds_init()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: pass cli_credentials to cli_session_setup_gensec_send()
Stefan Metzmacher [Fri, 21 Oct 2016 18:35:01 +0000 (20:35 +0200)]
s3:libsmb: pass cli_credentials to cli_session_setup_gensec_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: split out a cli_session_creds_init() function
Andreas Schneider [Tue, 13 Sep 2016 12:40:36 +0000 (14:40 +0200)]
s3:libsmb: split out a cli_session_creds_init() function

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:libsmb: pass the optional dest_realm via the cli_credentials
Stefan Metzmacher [Fri, 28 Oct 2016 07:00:46 +0000 (09:00 +0200)]
s3:libsmb: pass the optional dest_realm via the cli_credentials

'dest_realm' is only valid in the winbindd use case, where we also have
the account in that realm.

We need to ask the DC to which KDC the principal belongs to, in order to
get the potential trust referrals right.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: let gensec handle the fallback from krb5 to ntlmssp
Stefan Metzmacher [Sat, 22 Oct 2016 07:52:48 +0000 (09:52 +0200)]
s3:libsmb: let gensec handle the fallback from krb5 to ntlmssp

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: remove target_principal argument from cli_session_setup_gensec_send()
Stefan Metzmacher [Thu, 27 Oct 2016 13:03:07 +0000 (15:03 +0200)]
s3:libsmb: remove target_principal argument from cli_session_setup_gensec_send()

It's enough to pass down target_service and target_hostname, that's all we
have at the smb layer. The kerberos layer should figure out what
the final target_principals is based on the users realm.

The gse_krb5 backend doesn't use it currently, so it's also unused.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: always pass the servers gss blob to gensec
Stefan Metzmacher [Thu, 27 Oct 2016 13:00:47 +0000 (15:00 +0200)]
s3:libsmb: always pass the servers gss blob to gensec

The spnego backend will take the "client use spnego principal" option.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: remove unused cli_session_setup_{lanman2,plain,nt1}*
Stefan Metzmacher [Wed, 26 Oct 2016 10:04:41 +0000 (12:04 +0200)]
s3:libsmb: remove unused cli_session_setup_{lanman2,plain,nt1}*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: make use of smb1cli_session_setup_{nt1,lm21}_send/recv()
Stefan Metzmacher [Wed, 26 Oct 2016 10:01:45 +0000 (12:01 +0200)]
s3:libsmb: make use of smb1cli_session_setup_{nt1,lm21}_send/recv()

This separates the construction of the ASCII-Password (lm_response)
and UNICODE-Password (nt_response) values from the marshalling logic.

We don't need the NT1 marshalling logic 3 times (guest, plain, nt1),
we just need it once now in smb1cli_session_setup_nt1*.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: make use of smb1cli_session_setup_ext_send/recv()
Stefan Metzmacher [Tue, 25 Oct 2016 19:50:44 +0000 (21:50 +0200)]
s3:libsmb: make use of smb1cli_session_setup_ext_send/recv()

This separates the spnego authentication logic from the
marshalling logic.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: handle the spnego as a first action in cli_session_setup_send()
Andreas Schneider [Mon, 7 Nov 2016 14:06:09 +0000 (15:06 +0100)]
s3:libsmb: handle the spnego as a first action in cli_session_setup_send()

This will make further restructuring easier.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: add some comments to the noop case for < PROTOCOL_LANMAN1 in cli_session_s...
Stefan Metzmacher [Wed, 26 Oct 2016 00:03:17 +0000 (02:03 +0200)]
s3:libsmb: add some comments to the noop case for < PROTOCOL_LANMAN1 in cli_session_setup_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: add smb1cli_session_setup_ext_send/recv()
Stefan Metzmacher [Tue, 25 Oct 2016 19:01:37 +0000 (21:01 +0200)]
libcli/smb: add smb1cli_session_setup_ext_send/recv()

This does a session setup for the NT1 protocol with CAP_EXTENDED_SECURITY.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: add smb1cli_session_setup_nt1_send/recv()
Stefan Metzmacher [Tue, 25 Oct 2016 13:40:59 +0000 (15:40 +0200)]
libcli/smb: add smb1cli_session_setup_nt1_send/recv()

This does a session setup for the NT1 protocol (without CAP_EXTENDED_SECURITY).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: add smb1cli_session_setup_lm21_send/recv()
Andreas Schneider [Thu, 3 Nov 2016 15:28:12 +0000 (16:28 +0100)]
libcli/smb: add smb1cli_session_setup_lm21_send/recv()

This does a session setup for the LANMAN 2(.1) protocol.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: reformat wscript
Stefan Metzmacher [Tue, 25 Oct 2016 11:27:54 +0000 (13:27 +0200)]
libcli/smb: reformat wscript

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: Add smb_bytes_pull_str() helper function
Stefan Metzmacher [Tue, 25 Oct 2016 12:50:41 +0000 (14:50 +0200)]
libcli/smb: Add smb_bytes_pull_str() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agolibcli/smb: move {smb,trans2}_bytes_push_{str,bytes}() to common code
Stefan Metzmacher [Tue, 25 Oct 2016 11:31:08 +0000 (13:31 +0200)]
libcli/smb: move {smb,trans2}_bytes_push_{str,bytes}() to common code

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:libsmb: let the callers only pass the password string to cli_session_setup[_send]()
Stefan Metzmacher [Tue, 25 Oct 2016 09:31:07 +0000 (11:31 +0200)]
s3:libsmb: let the callers only pass the password string to cli_session_setup[_send]()

There're no callers which tried to pass raw {lm,nt}_response any more.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:popt_common: simplify popt_common_credentials handling
Stefan Metzmacher [Fri, 21 Oct 2016 15:22:03 +0000 (17:22 +0200)]
s3:popt_common: simplify popt_common_credentials handling

This offers a global 'struct user_auth_info *cmdline_auth_info',
similar to the 'cmdline_credentials' we have in
source4/lib/cmdline/popt_common.c.

And we create that in the POPT_CALLBACK_REASON_PRE stage
and finalize it in the POPT_CALLBACK_REASON_POST stage.

That means much less boring work for the callers
and more freedom to change the user_auth_info internals
in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:gse: We need to use the users realm in the target_principal
Stefan Metzmacher [Mon, 24 Oct 2016 09:26:12 +0000 (11:26 +0200)]
s3:gse: We need to use the users realm in the target_principal

This is important in order to let the kdc of the users realm start with
the trust referral routing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4:gensec_gssapi: We need to use the users realm in the target_principal
Stefan Metzmacher [Mon, 24 Oct 2016 09:26:12 +0000 (11:26 +0200)]
s4:gensec_gssapi: We need to use the users realm in the target_principal

This is important in order to let the kdc of the users realm start with
the trust referral routing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoauth/credentials: make cli_credentials_get_ntlm_response() more robust
Stefan Metzmacher [Thu, 27 Oct 2016 11:32:31 +0000 (13:32 +0200)]
auth/credentials: make cli_credentials_get_ntlm_response() more robust

We always provide each output blob as it's own talloc memory
and also check for talloc failures.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoauth/credentials: anonymous should not have a user principal
Stefan Metzmacher [Sat, 22 Oct 2016 09:19:05 +0000 (11:19 +0200)]
auth/credentials: anonymous should not have a user principal

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos4-torture: add test for winspool_AsyncGetPrinterDriverDirectory()
Günther Deschner [Tue, 8 Nov 2016 10:32:20 +0000 (11:32 +0100)]
s4-torture: add test for winspool_AsyncGetPrinterDriverDirectory()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 15 05:09:31 CET 2016 on sn-devel-144

2 years agos4-torture: add test for winspool_AsyncDeletePrintDriverPackage
Günther Deschner [Wed, 2 Nov 2016 11:30:58 +0000 (12:30 +0100)]
s4-torture: add test for winspool_AsyncDeletePrintDriverPackage

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_AsyncCorePrinterDriverInstalled
Günther Deschner [Fri, 28 Oct 2016 20:49:21 +0000 (22:49 +0200)]
s4-torture: add test for winspool_AsyncCorePrinterDriverInstalled

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for spoolss vs. iremotewinspool context handles
Günther Deschner [Mon, 5 Sep 2016 20:49:39 +0000 (22:49 +0200)]
s4-torture: add test for spoolss vs. iremotewinspool context handles

This test demonstrates that one cannot use a handle retrieved via
iremotewinspool in a spoolss context.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_AsyncGetPrinterData
Günther Deschner [Thu, 1 Sep 2016 11:57:50 +0000 (13:57 +0200)]
s4-torture: add test for winspool_AsyncGetPrinterData

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_AsyncEnumPrinters
Günther Deschner [Thu, 25 Aug 2016 15:31:47 +0000 (17:31 +0200)]
s4-torture: add test for winspool_AsyncEnumPrinters

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_AsyncUploadPrinterDriverPackage
Günther Deschner [Tue, 23 Aug 2016 20:58:26 +0000 (22:58 +0200)]
s4-torture: add test for winspool_AsyncUploadPrinterDriverPackage

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_SyncUnRegisterForRemoteNotifications.
Günther Deschner [Tue, 23 Aug 2016 16:39:48 +0000 (18:39 +0200)]
s4-torture: add test for winspool_SyncUnRegisterForRemoteNotifications.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add test for winspool_SyncRegisterForRemoteNotifications.
Günther Deschner [Thu, 16 May 2013 16:21:30 +0000 (18:21 +0200)]
s4-torture: add test for winspool_SyncRegisterForRemoteNotifications.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add IRemoteWinspool rpc testsuite.
Günther Deschner [Tue, 15 Jan 2013 14:23:58 +0000 (15:23 +0100)]
s4-torture: add IRemoteWinspool rpc testsuite.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add torture_rpc_connection_with_binding()
Günther Deschner [Thu, 27 Oct 2016 12:12:35 +0000 (14:12 +0200)]
s4-torture: add torture_rpc_connection_with_binding()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agowbinfo: Use ntlmv2 by default for wbinfo -a
Volker Lendecke [Mon, 14 Nov 2016 15:38:29 +0000 (16:38 +0100)]
wbinfo: Use ntlmv2 by default for wbinfo -a

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3/client: obey 'disable netbios' smb.conf param, don't connect via NBT port.
Noel Power [Thu, 10 Nov 2016 08:27:57 +0000 (08:27 +0000)]
s3/client: obey 'disable netbios' smb.conf param, don't connect via NBT port.

If 'disable netbios' is true 'smbclient -L //server' will try use the NBT
port to list the servers and 'smbclient -M //server' use the netbios
messaging WinPopup facility, we should honour the config and not do that.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3-epmapper: Ignore epm_Map object guid
Andreas Schneider [Wed, 26 Oct 2016 16:06:36 +0000 (18:06 +0200)]
s3-epmapper: Ignore epm_Map object guid

Tests revealed that you can pass random GUIDs to epm_Map and Windows will
happily answer the query.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 12 02:49:23 CET 2016 on sn-devel-144

2 years agos4-torture: Fix test_EnumPrinterDrivers for level 8 printer drivers.
Günther Deschner [Fri, 11 Nov 2016 15:32:20 +0000 (16:32 +0100)]
s4-torture: Fix test_EnumPrinterDrivers for level 8 printer drivers.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3-rpcclient: add object_uuid argument to cmd_epmapper_map()
Günther Deschner [Fri, 11 Nov 2016 10:47:20 +0000 (11:47 +0100)]
s3-rpcclient: add object_uuid argument to cmd_epmapper_map()

This allows to test how an epmap-server deals with object_uuid during the
epm_Map call. On windows the object_uuid is always ignored expect for the case
when the first abstract_syntax in the tower is the mgmt service. Even in that
case, the role of the object_uuid is still unclear.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4-torture: add spoolss_SetPrinter ndr test to validate secdesc_ptr
Günther Deschner [Fri, 11 Nov 2016 18:17:55 +0000 (19:17 +0100)]
s4-torture: add spoolss_SetPrinter ndr test to validate secdesc_ptr

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agospoolss: Use correct values for secdesc and devmode pointers
Günther Deschner [Fri, 11 Nov 2016 15:29:20 +0000 (16:29 +0100)]
spoolss: Use correct values for secdesc and devmode pointers

ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'.

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

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3-printing: Allow printer names longer than 16 chars
Andreas Schneider [Thu, 10 Nov 2016 10:47:54 +0000 (11:47 +0100)]
s3-printing: Allow printer names longer than 16 chars

Printers with long names are supported in the meantime. However we issue
a warning that if one printer exceeeds 15 chars we warn about it.

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

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

2 years agos3-printing: Correctly encode CUPS printer URIs
Andreas Schneider [Wed, 9 Nov 2016 18:05:49 +0000 (19:05 +0100)]
s3-printing: Correctly encode CUPS printer URIs

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3-client: Sync in tool cmdline help with smbclient manpage
Andreas Schneider [Fri, 4 Nov 2016 15:00:05 +0000 (16:00 +0100)]
s3-client: Sync in tool cmdline help with smbclient manpage

From smbclient manpage:
notify <dir name>
    Query a directory for change notifications. This command issues a
    recursive filechangenotify call for all possible changes.

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): Wed Nov  9 06:12:23 CET 2016 on sn-devel-144

2 years agos3-spoolss: Remove printer from registry if it is unpublished
Andreas Schneider [Tue, 8 Nov 2016 11:20:41 +0000 (12:20 +0100)]
s3-spoolss: Remove printer from registry if it is unpublished

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov  8 18:05:10 CET 2016 on sn-devel-144

2 years agos3-printing: Improve debug message
Andreas Schneider [Tue, 8 Nov 2016 11:20:25 +0000 (12:20 +0100)]
s3-printing: Improve debug message

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2 years agoctdb-tests: Add tests for updated Debian style Samba start/stop
Martin Schwenke [Fri, 4 Nov 2016 00:47:18 +0000 (11:47 +1100)]
ctdb-tests: Add tests for updated Debian style Samba start/stop

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Nov  7 08:01:28 CET 2016 on sn-devel-144

2 years agoctdb-scripts: Fix Debian init in samba eventscript
Mathieu Parent [Mon, 31 Oct 2016 14:17:34 +0000 (15:17 +0100)]
ctdb-scripts: Fix Debian init in samba eventscript

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

Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Signed-off-by: Stefan Kania <stefan@kania-online.de>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agocredentials: Add test for credentials behaviour
Andrew Bartlett [Tue, 11 Oct 2016 22:28:26 +0000 (11:28 +1300)]
credentials: Add test for credentials behaviour

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Nov  7 03:51:11 CET 2016 on sn-devel-144

2 years agopycredentials: Add bindings for {get,set}_principal, get_ntlm_username_domain
Andrew Bartlett [Tue, 11 Oct 2016 22:27:54 +0000 (11:27 +1300)]
pycredentials: Add bindings for {get,set}_principal, get_ntlm_username_domain

These will be used in testsuite for the credentials code

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agopython: samba.tests.credentials: Add tests
Lumir Balhar [Wed, 19 Oct 2016 10:11:31 +0000 (12:11 +0200)]
python: samba.tests.credentials: Add tests

Newly tested functions:
- set_utf16_password
- set_old_password
- get_old_password
- set_old_utf16_password

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agopython: samba.tests.credentials: Fix DeprecationWarning
Lumir Balhar [Tue, 18 Oct 2016 12:30:28 +0000 (14:30 +0200)]
python: samba.tests.credentials: Fix DeprecationWarning

For historical reasons, TestCase methods have some aliases
which are deprecated since Python 2.7.
Change "assertEquals" to the preferred name, "assertEqual".

Deprecation notice: https://docs.python.org/2/library/unittest.html#deprecated-aliases

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agosamba_tool/fsmo: Allocate RID Set when seizing RID manager
Garming Sam [Tue, 1 Nov 2016 03:29:53 +0000 (16:29 +1300)]
samba_tool/fsmo: Allocate RID Set when seizing RID manager

Seizing the role without allocating a RID set for itself is likely prone
to cause issues.

Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Fri Nov  4 08:37:05 CET 2016 on sn-devel-144

2 years agopython-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions
Andrew Bartlett [Mon, 31 Oct 2016 23:38:48 +0000 (12:38 +1300)]
python-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions

This will allow callers to catch specific errors rather than RuntimeException

As this slightly changes the exception, the timecmd test must be updated.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agopython: Add DsExtendedError Exception
Andrew Bartlett [Tue, 1 Nov 2016 03:09:20 +0000 (16:09 +1300)]
python: Add DsExtendedError Exception

This will be used for checking errors during a GetNCChanges EXOP like
RID Set allocation.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agopyerrors: Add PyErr_Set{WERROR,HRESULT,NTSTATUS}_and_string()
Andrew Bartlett [Tue, 1 Nov 2016 03:03:09 +0000 (16:03 +1300)]
pyerrors: Add PyErr_Set{WERROR,HRESULT,NTSTATUS}_and_string()

This varient allows control of the text explaination string

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agopython: create NTSTATUSError, HRESULTError and WERRORError
Andrew Bartlett [Tue, 1 Nov 2016 02:23:58 +0000 (15:23 +1300)]
python: create NTSTATUSError, HRESULTError and WERRORError

The advantage of these over the previous use of just RuntimeError is that we can
catch just the errors we want, without having to catch all possible RuntimeError
cases and assume they decode to a tuple

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agodsdb: Catch errors in extended operations (like allocating a RID Set)
Andrew Bartlett [Mon, 31 Oct 2016 03:25:51 +0000 (16:25 +1300)]
dsdb: Catch errors in extended operations (like allocating a RID Set)

There are cases where allocating a RID Set can reasonably fail.  Catch those nicely.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agodsdb: Rework DSDB code to use WERROR
Andrew Bartlett [Mon, 31 Oct 2016 03:19:37 +0000 (16:19 +1300)]
dsdb: Rework DSDB code to use WERROR

The WERROR codes are more descriptive for DSDB issues, and almost all the code was
converting from WERROR to NTSTATUS.  This will allow us to better catch specific
errors like WERR_DS_DRA_MISSING_PARENT

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398

2 years agodsdb: Create RID Set as SYSTEM
Andrew Bartlett [Sun, 30 Oct 2016 21:41:39 +0000 (10:41 +1300)]
dsdb: Create RID Set as SYSTEM

We do not want random users with add-user rights to own the new RID Set for this
server, and the ridSet class is thankfully system-only.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2 years agodbcheck: Correctly initialise keep_transaction in missing_parent test
Andrew Bartlett [Thu, 3 Nov 2016 00:30:56 +0000 (13:30 +1300)]
dbcheck: Correctly initialise keep_transaction in missing_parent test

Otherwise there is no point to this variable, we are trying to work out
if the subsequent modify succeded

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954

2 years agodbcheck: confirm RID Set presence and consistency
Clive Ferreira [Thu, 27 Oct 2016 04:28:01 +0000 (17:28 +1300)]
dbcheck: confirm RID Set presence and consistency

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954

2 years agodsdb: Add python hooks to allocate a RID set and allocate a RID pool
Andrew Bartlett [Fri, 28 Oct 2016 03:08:57 +0000 (16:08 +1300)]
dsdb: Add python hooks to allocate a RID set and allocate a RID pool

This will help us to correct errors during dbcheck

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9954

2 years agotests/ridalloc_exop: Add a new suite of tests for RID allocation
Garming Sam [Mon, 31 Oct 2016 02:24:49 +0000 (15:24 +1300)]
tests/ridalloc_exop: Add a new suite of tests for RID allocation

This moves some tests from getnc_exop.py regarding RID sets as well as
adding new tests for actions on join.

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

Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>

Signed-off-by: Andrew Bartlett <abartlet@samaba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2 years agoctdb-scripts: Fix calculation of CTDB_BASE
Amitay Isaacs [Thu, 3 Nov 2016 05:03:24 +0000 (16:03 +1100)]
ctdb-scripts: Fix calculation of CTDB_BASE

This is a regression introduced in f227c26178c2eaf3fae49f32a90ec905f85005f4.

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

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): Thu Nov  3 10:10:31 CET 2016 on sn-devel-144

2 years agos3-winbind: Do not return NO_MEMORY if we have an empty user list
Andreas Schneider [Wed, 2 Nov 2016 16:19:09 +0000 (17:19 +0100)]
s3-winbind: Do not return NO_MEMORY if we have an empty user list

The domain child for the MACHINE ACCOUNT might fail with
NT_STATUS_NO_MEMORY because an emtpy user list is returned.

*pnum_info is already set to 0 at the beginngin so we should just
declare victory here!

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

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): Thu Nov  3 05:36:17 CET 2016 on sn-devel-144

2 years agocollect_tombstones: Allow links to recycled objects to be deleted
Garming Sam [Fri, 21 Oct 2016 02:50:09 +0000 (15:50 +1300)]
collect_tombstones: Allow links to recycled objects to be deleted

The reason we choose to provide the string DN is because extended_dn_in
will try to correct the <GUID=...> by searching on it (despite the fact
it does not exist and then failing on a ldb_dn_validate in
objectclass_attrs).

We can now also remove the dangling link test from the knownfail.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12385

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov  3 01:46:43 CET 2016 on sn-devel-144

2 years agotombstones-expunge: Add a test for deleting links to recycled objects
Garming Sam [Thu, 20 Oct 2016 22:40:51 +0000 (11:40 +1300)]
tombstones-expunge: Add a test for deleting links to recycled objects

Currently this fails because we rely on a GUID DN, which fails to
resolve in the case that the GUID no longer exists in the database (i.e.
when that object has been purged after 6 months).

The tests use a made up extended DN built from fred where the GUID has
been tweaked.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12385

2 years agolibcli: Increase the debug level for expired tickets
Volker Lendecke [Tue, 1 Nov 2016 15:32:57 +0000 (16:32 +0100)]
libcli: Increase the debug level for expired tickets

In libads/sasl.c we do a retry in this case. We should not
spam syslog with that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  2 05:22:38 CET 2016 on sn-devel-144

2 years agoobjectclass_attrs: Only abort on a missing attribute when an attribute is both MUST...
Clive Ferreira [Tue, 11 Oct 2016 02:32:54 +0000 (15:32 +1300)]
objectclass_attrs: Only abort on a missing attribute when an attribute is both MUST and replicated

If an attribute is not replicated or constructed, it is quite normal for
it to be missing. This is the case with both rIDNextRid and
rIDPreviousAllocationPool. This currently prevents us switching the RID
master. On Windows, missing this attribute does not cause any problems
for the RID manager.

We may now remove the knownfail entry added earlier.

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz>

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

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Nov  2 01:28:44 CET 2016 on sn-devel-144

2 years agotypo: supprise -> surprise
Clive Ferreira [Thu, 20 Oct 2016 03:20:49 +0000 (16:20 +1300)]
typo: supprise -> surprise

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

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

2 years agotests/getnc_exop: Finish a comment in getnc_exop.py
Garming Sam [Thu, 20 Oct 2016 03:19:43 +0000 (16:19 +1300)]
tests/getnc_exop: Finish a comment in getnc_exop.py

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

2 years agotests/getnc_exop: Improve the ridalloc test by performing an alloc against a new...
Bob Campbell [Mon, 10 Oct 2016 03:58:57 +0000 (16:58 +1300)]
tests/getnc_exop: Improve the ridalloc test by performing an alloc against a new master

Currently we fail against ourselves due to rIDNextRid and
rIDPreviousAllocationPool normally being unset, despite being mandatory
attributes (being the only attributes in this situation).

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Clive Ferreira <cliveferreira@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

2 years agoobjectclass_attrs: correctly indent a comment
Clive Ferreira [Tue, 11 Oct 2016 02:33:06 +0000 (15:33 +1300)]
objectclass_attrs: correctly indent a comment

Signed-off-by: Clive Ferreira <cliveferreira@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12394

2 years agobuild: Fix build with perl on debian sid.
Andrew Bartlett [Tue, 25 Oct 2016 11:06:12 +0000 (00:06 +1300)]
build: Fix build with perl on debian sid.

build: Fix build with perl on debian sid.

It appears that "." is no longer in perl_inc

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12395
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Oct 29 09:32:37 CEST 2016 on sn-devel-144

2 years agos3-waf: Move spoolssd into its own subsystem
Günther Deschner [Thu, 27 Oct 2016 13:51:39 +0000 (15:51 +0200)]
s3-waf: Move spoolssd into its own subsystem

More cleanup will follow later.

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 28 22:30:54 CEST 2016 on sn-devel-144

2 years agos3-rpcclient: allow to pass down interface and transport to epmmap command
Günther Deschner [Wed, 26 Oct 2016 16:45:29 +0000 (18:45 +0200)]
s3-rpcclient: allow to pass down interface and transport to epmmap command

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoprovision: Add support for BIND 9.11.x
Amitay Isaacs [Mon, 26 Sep 2016 14:51:03 +0000 (00:51 +1000)]
provision: Add support for BIND 9.11.x

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 28 03:42:25 CEST 2016 on sn-devel-144

2 years agodlz-bind: Add support for BIND 9.11.x
Amitay Isaacs [Mon, 26 Sep 2016 14:51:03 +0000 (00:51 +1000)]
dlz-bind: Add support for BIND 9.11.x

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND version
Amitay Isaacs [Mon, 26 Sep 2016 15:00:34 +0000 (01:00 +1000)]
dlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND version

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodlz-bind: Fix initialization of DLZ_DLOPEN_AGE
Amitay Isaacs [Mon, 26 Sep 2016 14:57:00 +0000 (00:57 +1000)]
dlz-bind: Fix initialization of DLZ_DLOPEN_AGE

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agodlz-bind: Fix preprocessor checks for BIND versions
Amitay Isaacs [Mon, 26 Sep 2016 14:52:53 +0000 (00:52 +1000)]
dlz-bind: Fix preprocessor checks for BIND versions

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoctdb-packaging: Update required tdb version for tdb_storev()
Amitay Isaacs [Thu, 15 Sep 2016 06:36:33 +0000 (16:36 +1000)]
ctdb-packaging: Update required tdb version for tdb_storev()

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tools: Simplify using a local variable
Amitay Isaacs [Wed, 12 Oct 2016 04:46:17 +0000 (15:46 +1100)]
ctdb-tools: Simplify using a local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tools: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:41:25 +0000 (15:41 +1100)]
ctdb-tools: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tool: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:37:47 +0000 (15:37 +1100)]
ctdb-tool: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-client: Simplify using tdb_storev
Amitay Isaacs [Wed, 12 Oct 2016 04:32:29 +0000 (15:32 +1100)]
ctdb-client: Simplify using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-client: Simplify using a local variable
Amitay Isaacs [Wed, 12 Oct 2016 04:32:17 +0000 (15:32 +1100)]
ctdb-client: Simplify using a local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-daemon: Simplify code using tdb_storev
Amitay Isaacs [Fri, 2 Sep 2016 07:53:32 +0000 (17:53 +1000)]
ctdb-daemon: Simplify code using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-common: Simplify code using tdb_storev
Amitay Isaacs [Fri, 2 Sep 2016 07:22:26 +0000 (17:22 +1000)]
ctdb-common: Simplify code using tdb_storev

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-daemon: Simplify code using local variable
Amitay Isaacs [Fri, 2 Sep 2016 07:51:36 +0000 (17:51 +1000)]
ctdb-daemon: Simplify code using local variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>