garming/samba-autobuild/.git
10 years agoctdb-recoverd: Ignore failed ipreallocated controls to inactive nodes
Martin Schwenke [Tue, 26 Nov 2013 01:35:44 +0000 (12:35 +1100)]
ctdb-recoverd: Ignore failed ipreallocated controls to inactive nodes

Currently timeouts for controls to inactive nodes can cause banning
credits to be applied.  This should not happen.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agos3-winbind: Improve performance of wb_fill_pwent_sid2uid_done().
Volker Lendecke [Thu, 16 Jan 2014 15:10:25 +0000 (16:10 +0100)]
s3-winbind: Improve performance of wb_fill_pwent_sid2uid_done().

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

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): Thu Jan 16 20:17:24 CET 2014 on sn-devel-104

10 years agoAdd missing include dirs to .clang_complete.
Andreas Schneider [Fri, 13 Dec 2013 17:50:27 +0000 (18:50 +0100)]
Add missing include dirs to .clang_complete.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agodcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
Stefan Metzmacher [Thu, 9 Jan 2014 15:00:23 +0000 (16:00 +0100)]
dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104

10 years agos4:librpc/rpc: change dcerpc_map_reason() into dcerpc_map_nak_reason()
Stefan Metzmacher [Thu, 9 Jan 2014 15:22:03 +0000 (16:22 +0100)]
s4:librpc/rpc: change dcerpc_map_reason() into dcerpc_map_nak_reason()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: add dcerpc_map_ack_reason()
Stefan Metzmacher [Thu, 9 Jan 2014 15:20:46 +0000 (16:20 +0100)]
s4:librpc/rpc: add dcerpc_map_ack_reason()

This is not the value as dcerpc_bind_ack_reason values are not the same
as dcerpc_bind_nak_reason values.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agodcerpc.idl: make use of dcerpc_bind_nak_reason
Stefan Metzmacher [Thu, 9 Jan 2014 14:59:56 +0000 (15:59 +0100)]
dcerpc.idl: make use of dcerpc_bind_nak_reason

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agodcerpc.idl: make use of dcerpc_bind_ack_result
Stefan Metzmacher [Thu, 9 Jan 2014 14:58:46 +0000 (15:58 +0100)]
dcerpc.idl: make use of dcerpc_bind_ack_result

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agodcerpc.idl: add enums and bitmaps for dcerpc_bind_ack_result, dcerpc_bind_[ack|nak...
Stefan Metzmacher [Thu, 9 Jan 2014 14:56:45 +0000 (15:56 +0100)]
dcerpc.idl: add enums and bitmaps for dcerpc_bind_ack_result, dcerpc_bind_[ack|nak]_reason

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agodcerpc.idl: add a bitmap for dcerpc_pfc_flags
Stefan Metzmacher [Sat, 11 Jan 2014 10:52:37 +0000 (11:52 +0100)]
dcerpc.idl: add a bitmap for dcerpc_pfc_flags

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agodcerpc.idl: use logical dcerpc_object ordering
David Disseldorp [Mon, 6 Jan 2014 05:20:08 +0000 (06:20 +0100)]
dcerpc.idl: use logical dcerpc_object ordering

This IDL code:
typedef [nodiscriminant] union {
[default] dcerpc_empty empty;
[case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object;
} dcerpc_object;

Compiles into the following default-before-case marshalling code:
switch (level) {
default: {
NDR_CHECK(ndr_push_dcerpc_empty(ndr, NDR_SCALARS, &r->empty));
break; }

case LIBNDR_FLAG_OBJECT_PRESENT: {
NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
break; }

}

The default entry before case does not change the flow of execution but
is more logical when present at the end of the switch statement.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos4:torture/libnet: fix compiler warnings in libnet_lookup.c
Stefan Metzmacher [Tue, 14 Jan 2014 15:38:38 +0000 (16:38 +0100)]
s4:torture/libnet: fix compiler warnings in libnet_lookup.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/libnet: check the result of libnet_LookupName()
Stefan Metzmacher [Tue, 14 Jan 2014 15:38:38 +0000 (16:38 +0100)]
s4:torture/libnet: check the result of libnet_LookupName()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove compiler warnings in ntsvcs.c
Stefan Metzmacher [Tue, 14 Jan 2014 15:37:36 +0000 (16:37 +0100)]
s4:torture/rpc: remove compiler warnings in ntsvcs.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove compiler warnings in spoolss_notify.c
Stefan Metzmacher [Tue, 14 Jan 2014 15:37:36 +0000 (16:37 +0100)]
s4:torture/rpc: remove compiler warnings in spoolss_notify.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: s/pipe/pipes/
Stefan Metzmacher [Fri, 10 Jan 2014 12:46:34 +0000 (13:46 +0100)]
s4:torture/rpc: s/pipe/pipes/

pipe(2) is a system call.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: remove unused variables from alter_context.c
Stefan Metzmacher [Fri, 10 Jan 2014 12:44:51 +0000 (13:44 +0100)]
s4:torture/rpc: remove unused variables from alter_context.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: remove unused code from cmd_lsa_get_username()
Stefan Metzmacher [Mon, 13 Jan 2014 09:18:02 +0000 (10:18 +0100)]
s3:rpcclient: remove unused code from cmd_lsa_get_username()

lsa_GetUserName() doesn't require a policy handle.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECT
Stefan Metzmacher [Mon, 13 Jan 2014 09:16:40 +0000 (10:16 +0100)]
s3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECT

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc: remove dcerpc_event_context()
Stefan Metzmacher [Tue, 14 Jan 2014 13:19:56 +0000 (14:19 +0100)]
s4:librpc: remove dcerpc_event_context()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: avoid using dcerpc_event_context()
Stefan Metzmacher [Tue, 14 Jan 2014 11:34:58 +0000 (12:34 +0100)]
s4:torture/rpc: avoid using dcerpc_event_context()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: avoid usage of p->conn->event_ctx
Stefan Metzmacher [Tue, 14 Jan 2014 11:30:44 +0000 (12:30 +0100)]
s4:torture/rpc: avoid usage of p->conn->event_ctx

torture_suite_add_rpc_iface_tcase() uses tctx->ev,
which means p->conn->event_ctx and tctx->ev are the same.

As we want to get rid of per connection tevent_context pointers,
we should use tctx->ev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/libnet: remove bogus usage of p->conn->event_ctx
Stefan Metzmacher [Tue, 14 Jan 2014 11:27:10 +0000 (12:27 +0100)]
s4:torture/libnet: remove bogus usage of p->conn->event_ctx

ctx->event_ctx and p->conn->event_ctx already have the same value
as torture->ev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: let wb_samr_userdomgroups_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:winbind: let wb_samr_userdomgroups_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: let wb_lsa_lookupsids_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:winbind: let wb_lsa_lookupsids_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: make clear that we use the global tevent_context
Stefan Metzmacher [Tue, 14 Jan 2014 10:55:19 +0000 (11:55 +0100)]
s4:winbind: make clear that we use the global tevent_context

We should avoid using the tevent_context pointer on a
dcecli_connection, it's the same as the global per task one
anyway.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: correctly fill the libnet_context lsa and samr binding handles
Stefan Metzmacher [Thu, 16 Jan 2014 00:00:18 +0000 (01:00 +0100)]
s4:winbind: correctly fill the libnet_context lsa and samr binding handles

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_usermod_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_usermod_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_userdel_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_userdel_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: remove unused libnet_rpc_groupdel* code
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: remove unused libnet_rpc_groupdel* code

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_groupadd_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_groupadd_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: let libnet_rpc_groupinfo_send() take tevent_context/dcerpc_binding_handle
Stefan Metzmacher [Tue, 14 Jan 2014 11:11:17 +0000 (12:11 +0100)]
s4:libnet: let libnet_rpc_groupinfo_send() take tevent_context/dcerpc_binding_handle

This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: avoid using dcecli_connection->event_ctx
Stefan Metzmacher [Tue, 14 Jan 2014 10:58:15 +0000 (11:58 +0100)]
s4:libnet: avoid using dcecli_connection->event_ctx

We should avoid per connection tevent_contexts,
the one per libnet_context isn't much better, but a start.

Note the pointers have the same value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: keep a dcerpc_binding_handle for samr and lsa
Stefan Metzmacher [Thu, 16 Jan 2014 12:31:43 +0000 (13:31 +0100)]
s4:libnet: keep a dcerpc_binding_handle for samr and lsa

This completes commit a3ae9802d47f7a39030be089d15fc42f8e8917e6.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dbwrap: Use milliseconds for "Held tdb lock" message
Christof Schmitt [Tue, 14 Jan 2014 21:23:04 +0000 (14:23 -0700)]
s3:dbwrap: Use milliseconds for "Held tdb lock" message

This is consistent with the parameter using milliseconds and the other
warnings in the same file also using milliseconds.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 16 11:19:39 CET 2014 on sn-devel-104

10 years agos3:dbwrap: Store warning thresholds in db_ctdb_ctx
Christof Schmitt [Tue, 14 Jan 2014 21:17:32 +0000 (14:17 -0700)]
s3:dbwrap: Store warning thresholds in db_ctdb_ctx

Avoid the parameter lookup for the warning thresholds in the hot code
path by reading them in db_open_ctdb and storing them in the
db_ctdb_ctx.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos3:dbwrap include the hashchain in the logs
Christian Ambach [Mon, 13 May 2013 16:20:43 +0000 (18:20 +0200)]
s3:dbwrap include the hashchain in the logs

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos3:dbwrap report time for chainlock and CTDB migrate
Christian Ambach [Mon, 13 May 2013 15:02:17 +0000 (17:02 +0200)]
s3:dbwrap report time for chainlock and CTDB migrate

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agodbwrap_ctdb: Instrument chainunlock timing
Volker Lendecke [Mon, 6 May 2013 08:56:12 +0000 (10:56 +0200)]
dbwrap_ctdb: Instrument chainunlock timing

We need an indication whether we run into the fcntl thundering
herd. fcntl unlock should be blindingly fast in the normal case. If it
takes longer than 5 milliseconds, warn. The timeout can be adapted by
setting

ctdb:unlock_warn_threshold = <number-of-milliseconds>

Reviewed-by: Christof Schmitt <cs@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
10 years agoctdb_conn: Log long fetch_lock calls
Volker Lendecke [Fri, 1 Feb 2013 11:49:52 +0000 (12:49 +0100)]
ctdb_conn: Log long fetch_lock calls

With this patch, the number of fetch_lock attempts before dbwrap_ctdb
logs that it took x attempts to get a record is configurable with

net conf setparm global ctdb:migrate_attempts 10

This patch also adds

net conf setparm global ctdb:migrate_duration 5000

to trigger the same log message if it took longer than x milliseconds
to retrieve a record.

Reviewed-by: Christof Schmitt <cs@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
10 years agoctdb-daemon: Remove ctdb_fork_with_logging()
Amitay Isaacs [Wed, 18 Dec 2013 03:09:52 +0000 (14:09 +1100)]
ctdb-daemon: Remove ctdb_fork_with_logging()

This function has been replaced with ctdb_vfork_with_logging().

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 Jan 16 04:05:35 CET 2014 on sn-devel-104

10 years agoctdb-tests: Set CTDB_EVENT_HELPER when running with local daemons
Amitay Isaacs [Mon, 13 Jan 2014 04:16:46 +0000 (15:16 +1100)]
ctdb-tests: Set CTDB_EVENT_HELPER when running with local daemons

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Remove unused code to run eventscripts
Amitay Isaacs [Tue, 17 Dec 2013 08:22:20 +0000 (19:22 +1100)]
ctdb-daemon: Remove unused code to run eventscripts

Eventscripts are now executed using a helper.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Replace ctdb_fork_with_logging with ctdb_vfork_with_logging (part 2)
Amitay Isaacs [Wed, 18 Dec 2013 03:07:57 +0000 (14:07 +1100)]
ctdb-daemon: Replace ctdb_fork_with_logging with ctdb_vfork_with_logging (part 2)

Use ctdb_event_helper to run debug-hung-script.sh.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Replace ctdb_fork_with_logging with ctdb_vfork_with_logging (part 1)
Amitay Isaacs [Tue, 17 Dec 2013 08:19:51 +0000 (19:19 +1100)]
ctdb-daemon: Replace ctdb_fork_with_logging with ctdb_vfork_with_logging (part 1)

Use ctdb_event_helper to run eventscripts.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Add helper process to execute event scripts
Amitay Isaacs [Mon, 16 Dec 2013 04:40:01 +0000 (15:40 +1100)]
ctdb-daemon: Add helper process to execute event scripts

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Add ctdb_vfork_with_logging()
Amitay Isaacs [Mon, 16 Dec 2013 04:39:29 +0000 (15:39 +1100)]
ctdb-daemon: Add ctdb_vfork_with_logging()

This will be used to spawn lightweight helper processes to run
eventscripts.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: No need to call event scripts with CTDB_CALLED_BY_USER
Amitay Isaacs [Mon, 16 Dec 2013 04:57:42 +0000 (15:57 +1100)]
ctdb-daemon: No need to call event scripts with CTDB_CALLED_BY_USER

This was added to support external monitoring using CTDB event scripts.
However, it was never used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-daemon: Deprecate RELOAD and STATUS events
Amitay Isaacs [Mon, 23 Dec 2013 00:46:48 +0000 (11:46 +1100)]
ctdb-daemon: Deprecate RELOAD and STATUS events

These events have never been used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agoctdb-common: mkdir_p should not try to create .
Amitay Isaacs [Tue, 17 Dec 2013 08:48:29 +0000 (19:48 +1100)]
ctdb-common: mkdir_p should not try to create .

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
10 years agovfs/glusterfs: in case atime is not passed, set it to the current atime
Niels de Vos [Fri, 10 Jan 2014 15:26:18 +0000 (16:26 +0100)]
vfs/glusterfs: in case atime is not passed, set it to the current atime

The Linux CIFS client does not pass an updated atime when a write() is
done. This causes the vfs/glusterfs module to set the atime to -1 on the
Gluster backend, resulting in an atime far in the future (year 2106).

Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 15 21:31:30 CET 2014 on sn-devel-104

10 years agos3:dir - We now pass the previously spinning directory tests on ext4.
Jeremy Allison [Mon, 13 Jan 2014 18:20:25 +0000 (10:20 -0800)]
s3:dir - We now pass the previously spinning directory tests on ext4.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 15 11:39:12 CET 2014 on sn-devel-104

10 years agos3:dir - Introduce a 64-bit directory offset <-> 32 bit wire offset map using memcache.
Jeremy Allison [Sat, 11 Jan 2014 23:45:48 +0000 (15:45 -0800)]
s3:dir - Introduce a 64-bit directory offset <-> 32 bit wire offset map using memcache.

Should fix the DOS clients against 64-bit smbd's bug.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:dir - Add a new memcache type (non-talloc) - SMB1_SEARCH_OFFSET_MAP.
Jeremy Allison [Sat, 11 Jan 2014 21:58:46 +0000 (13:58 -0800)]
s3:dir - Add a new memcache type (non-talloc) - SMB1_SEARCH_OFFSET_MAP.

We will use this in mapping 64-bit directory offset
cookies to a 32-bit counter.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:dir - Map wire offsets to native directory cookies.
Jeremy Allison [Sat, 11 Jan 2014 23:04:38 +0000 (15:04 -0800)]
s3:dir - Map wire offsets to native directory cookies.

Take care of the special offsets.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:dir - Cope with fixed mapping of 'special' values.
Jeremy Allison [Sat, 11 Jan 2014 22:59:00 +0000 (14:59 -0800)]
s3:dir - Cope with fixed mapping of 'special' values.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3: dir - Introduce 32-bit wire versions of the 'special' values.
Jeremy Allison [Sat, 11 Jan 2014 22:56:57 +0000 (14:56 -0800)]
s3: dir - Introduce 32-bit wire versions of the 'special' values.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:dir - Introduce a function to map a directory cookie to a 32-bit wire cookie.
Jeremy Allison [Sat, 11 Jan 2014 22:48:00 +0000 (14:48 -0800)]
s3:dir - Introduce a function to map a directory cookie to a 32-bit wire cookie.

Make this an identity for now.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:dir - In the old SMB1 search code, rename offset to wire_offset to distinguish...
Jeremy Allison [Sat, 11 Jan 2014 22:36:17 +0000 (14:36 -0800)]
s3:dir - In the old SMB1 search code, rename offset to wire_offset to distinguish between wire and native offsets.

Rename uint32 type to correct uint32_t.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agosmbd: Avoid duplicate debug header lines
Volker Lendecke [Fri, 10 Jan 2014 12:02:59 +0000 (13:02 +0100)]
smbd: Avoid duplicate debug header lines

This is what gets created in log.smbd: DEBUGLVL generates an empty
header line, CHECK_DEBUGLVL avoids this.

[2014/01/10 12:58:24.971658, 10, pid=2329, effective(1001, 1001), real(0, 0)] ../source3/smbd/smbXsrv_open.c:696(smbXsrv_open_global_store)
[2014/01/10 12:58:24.971690, 10, pid=2329, effective(1001, 1001), real(0, 0)] ../source3/smbd/smbXsrv_open.c:698(smbXsrv_open_global_store)

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 Jan 15 04:02:58 CET 2014 on sn-devel-104

10 years agos3: set native os according to Windows and NBT_ANNOUNCE_VERSION defines
Björn Jacke [Tue, 7 Jan 2014 14:57:50 +0000 (15:57 +0100)]
s3: set native os according to Windows and NBT_ANNOUNCE_VERSION defines

When the native os in sessionsetup is "Unix" then broken Konica Minolta
printers refuse to talk to those CIFS servers. Other CIFS servers also announce
themselves with native os Windows. Let's do the same to improve
interoperability with broken devices like those printers from Konica Minolta.
Thanks to Daniel Hoffmann for finding and reporting this Konika printer
brokenness.

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

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbcontrol: fix NUM_CHILDREN message deregister
David Disseldorp [Tue, 14 Jan 2014 22:45:06 +0000 (14:45 -0800)]
smbcontrol: fix NUM_CHILDREN message deregister

smbcontrol registers for MSG_SMB_NUM_CHILDREN response messages before
sending a MSG_SMB_TELL_NUM_CHILDREN request.
The same MSG_SMB_NUM_CHILDREN response message should be deregistered.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Christof Schmit <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoRevert "pam_winbind: fix segfault in pam_sm_authenticate()"
Garming Sam [Mon, 16 Dec 2013 03:51:10 +0000 (16:51 +1300)]
Revert "pam_winbind: fix segfault in pam_sm_authenticate()"

This reverts commit ec0f51b200d6e5b99bbd872e169621c17f33524c.

A more generic fix is now in use.

Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan 15 01:37:38 CET 2014 on sn-devel-104

10 years agopam_winbind: Do not honour require_membership_of in the acct module parameters
Garming Sam [Mon, 16 Dec 2013 03:51:04 +0000 (16:51 +1300)]
pam_winbind: Do not honour require_membership_of in the acct module parameters

This needs a password to work, and it confuses users for it to appear to be valid here.

Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agopam_winbind: Fix segfault caused by invalid configuration options
Garming Sam [Mon, 16 Dec 2013 03:50:37 +0000 (16:50 +1300)]
pam_winbind: Fix segfault caused by invalid configuration options

This is a better fix for 8564 and will allow ec0f51b200d6e5b99bbd872e169621c17f33524c to be reverted.

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

Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agolib/param: fix unix extensions setting to be consistent with s3 and docs
Garming Sam [Wed, 8 Jan 2014 00:28:23 +0000 (13:28 +1300)]
lib/param: fix unix extensions setting to be consistent with s3 and docs

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agontvfs: Remove CAP_UNIX from the ntvfs file server as it was never finished
Andrew Bartlett [Fri, 10 Jan 2014 01:19:38 +0000 (14:19 +1300)]
ntvfs: Remove CAP_UNIX from the ntvfs file server as it was never finished

Only some of the unix extensions where implemented, but this was enough
to caused the samba3.smbtorture_s3.plain(dc).LARGE_READX to fail when they
are enabled (as is the default in source3/param).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agodfs: always call create_conn_struct with root privileges
Garming Sam [Wed, 18 Dec 2013 20:55:44 +0000 (09:55 +1300)]
dfs: always call create_conn_struct with root privileges

This fixes a bug in dfs_samba4 identified by Daniel Müller.

create_conn_struct calls SMB_VFS_CONNECT which requires root privileges.
SMB_VFS_CONNECT in turn calls dfs_samba4_connect which connects to samdb.

Calls were made to this function without ever becoming root (notably via setup_dfs_referral)
which resulted in an error and the VFS connect failing. This happens when you have an active
directory domain controller with host msdfs = yes in smb.conf and dfs links in place.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Bjoern Baumbach <bb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 10 20:11:03 CET 2014 on sn-devel-104

10 years agomessaging: Fix a memleak (master only..)
Volker Lendecke [Wed, 8 Jan 2014 15:32:39 +0000 (16:32 +0100)]
messaging: Fix a memleak (master only..)

Immediate tevents don't free themselves as timed events do :-)

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): Fri Jan 10 01:20:04 CET 2014 on sn-devel-104

10 years agomessaging: Use talloc_pooled_object
Volker Lendecke [Wed, 8 Jan 2014 15:15:27 +0000 (16:15 +0100)]
messaging: Use talloc_pooled_object

... not as a speed improvement, it saves the second NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging: Move the self-send logic out of messaging_tdb
Volker Lendecke [Wed, 8 Jan 2014 15:13:11 +0000 (16:13 +0100)]
messaging: Move the self-send logic out of messaging_tdb

This is not specific to tdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging: Fix a memleak with clustering
Volker Lendecke [Wed, 8 Jan 2014 09:32:37 +0000 (09:32 +0000)]
messaging: Fix a memleak with clustering

We have to properly throw away unexpected messages that came in via ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-passdb: Fix string duplication to pointers.
Andreas Schneider [Thu, 9 Jan 2014 14:20:21 +0000 (15:20 +0100)]
s3-passdb: Fix string duplication to pointers.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan  9 22:35:25 CET 2014 on sn-devel-104

10 years agowbinfo: Fix a memory leak in wbinfo_ping_dc().
Andreas Schneider [Thu, 9 Jan 2014 14:12:24 +0000 (15:12 +0100)]
wbinfo: Fix a memory leak in wbinfo_ping_dc().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agos3-libads: Fix memory leaks in ads_build_path().
Andreas Schneider [Thu, 9 Jan 2014 14:06:14 +0000 (15:06 +0100)]
s3-libads: Fix memory leaks in ads_build_path().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agolib: Fix strict-aliasing warning in md5 code.
Andreas Schneider [Thu, 9 Jan 2014 13:50:18 +0000 (14:50 +0100)]
lib: Fix strict-aliasing warning in md5 code.

If the compiler detects strict aliasing problems it isn't able to
optimize the code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agogroup_mapping: Avoid a talloc
Volker Lendecke [Tue, 3 Dec 2013 15:01:35 +0000 (16:01 +0100)]
group_mapping: Avoid a talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan  9 20:41:15 CET 2014 on sn-devel-104

10 years agosamba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4
Matthias Dieter Wallnöfer [Wed, 8 Jan 2014 14:42:50 +0000 (15:42 +0100)]
samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4

http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104

10 years agos3: Avoid oplock break by storing timestamps with gpfs_set_times
Christof Schmitt [Tue, 7 Jan 2014 18:55:46 +0000 (11:55 -0700)]
s3: Avoid oplock break by storing timestamps with gpfs_set_times

The gpfs_set_times API call allows setting timestamps directly in GPFS
without going through the utime() call. Using this API call fixes an
unecessary oplock break when a client sends a SET_FILE_ALLOCATION_INFO
request and no other client has opened the file. The call to utime()
triggers the oplock break through the Linux kernel. Using the
gpfs_set_times call for updating the timestamp avoids the call to
utime() and the oplock break.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Jan  9 00:04:48 CET 2014 on sn-devel-104

10 years agos3: winbindd: Move calling setup_domain_child() into add_trusted_domain().
Jeremy Allison [Mon, 6 Jan 2014 23:22:59 +0000 (15:22 -0800)]
s3: winbindd: Move calling setup_domain_child() into add_trusted_domain().

Ensure it only gets called when a new domain is allocated
and added to the list.

This should fix problems with the previous logic where
setup_domain_child() was called in places where an existing
domain was returned.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  8 20:46:55 CET 2014 on sn-devel-104

10 years agos3: winbindd: Move the logic of whether to set 'domain->primary' into add_trusted_dom...
Jeremy Allison [Mon, 6 Jan 2014 23:15:37 +0000 (15:15 -0800)]
s3: winbindd: Move the logic of whether to set 'domain->primary' into add_trusted_domain().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agos4:rpc_server: remember the hdr_signing negotiation result in dcesrv_auth
Stefan Metzmacher [Wed, 8 Jan 2014 09:57:44 +0000 (10:57 +0100)]
s4:rpc_server: remember the hdr_signing negotiation result in dcesrv_auth

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan  8 18:37:22 CET 2014 on sn-devel-104

10 years agos4:rpc_server: use talloc_zero for struct dcesrv_connection
Stefan Metzmacher [Wed, 8 Jan 2014 09:57:19 +0000 (10:57 +0100)]
s4:rpc_server: use talloc_zero for struct dcesrv_connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:rpc_server: remove unused DCESRV_CALL_STATE_FLAG_HEADER_SIGNING
Stefan Metzmacher [Wed, 8 Jan 2014 09:52:51 +0000 (10:52 +0100)]
s4:rpc_server: remove unused DCESRV_CALL_STATE_FLAG_HEADER_SIGNING

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agondrdump: dump verification trailer
Gregor Beck [Mon, 6 Jan 2014 10:19:04 +0000 (11:19 +0100)]
ndrdump: dump verification trailer

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

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibrpc/ndr: add ndr_pop_dcerpc_sec_verification_trailer()
Gregor Beck [Thu, 2 Jan 2014 14:30:52 +0000 (15:30 +0100)]
librpc/ndr: add ndr_pop_dcerpc_sec_verification_trailer()

This extracts the dcerpc_sec_verification_trailer from the end
of an ndr_pull structure, it found it reduces ndr->data_size.

NDR_ERR_ALLOC is the only possible error, all other errors
are ignored and a trailer with command count = 0 is returned.

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

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibrpc/rpc: simplify tevent_req_nterror() usage in binding_handle.c
Stefan Metzmacher [Fri, 30 Aug 2013 07:48:06 +0000 (09:48 +0200)]
librpc/rpc: simplify tevent_req_nterror() usage in binding_handle.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibcli/auth: fix usage of an uninitialized variable in netlogon_creds_cli_check_caps()
Stefan Metzmacher [Wed, 8 Jan 2014 11:04:22 +0000 (12:04 +0100)]
libcli/auth: fix usage of an uninitialized variable in netlogon_creds_cli_check_caps()

If status is RPC_PROCNUM_OUT_OF_RANGE, result might be uninitialized.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
10 years agocrypto: fix build on OS X
Björn Jacke [Tue, 7 Jan 2014 14:55:57 +0000 (15:55 +0100)]
crypto: fix build on OS X

we also need to use the CC_MD5_CTX from CommonCrypto here instead of the MD5_CTX

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  8 08:12:29 CET 2014 on sn-devel-104

10 years agobuild: test the generic md5 function after importing it from hashlib
Björn Jacke [Tue, 7 Jan 2014 14:55:56 +0000 (15:55 +0100)]
build: test the generic md5 function after importing it from hashlib

otherwise we used the one from md5 which lead to the following warning on SerNet-imini:

the md5 module is deprecated; use hashlib instead import md5

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibgpo: apply some const.
Günther Deschner [Thu, 19 Dec 2013 21:23:44 +0000 (22:23 +0100)]
libgpo: apply some const.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jan  7 18:52:42 CET 2014 on sn-devel-104