sfrench/samba-autobuild/.git
10 years agotevent: version 0.9.21 tevent-0.9.21
Stefan Metzmacher [Fri, 27 Sep 2013 02:06:00 +0000 (04:06 +0200)]
tevent: version 0.9.21

This fixes a the following bugs:
- fix a crash bug in tevent_queue_immediate_trigger()
- add missing tevent_num_signals() and
  tevent_sa_info_queue_count() prototypes
  including documentation.

This adds the following new features:

- tevent_req_set_cleanup_fn()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: add tevent_req_set_cleanup_fn()
Stefan Metzmacher [Fri, 27 Sep 2013 00:29:57 +0000 (02:29 +0200)]
tevent: add tevent_req_set_cleanup_fn()

Note that some callers used their own destructor for their
tevent_req instance, they'll just overwrite this,
which is not intended, but works without problems.

The intended way is to specify a cleanup function
and handle the TEVENT_REQ_RECEIVED state as destructor.

Note that the TEVENT_REQ_RECEIVED cleanup event might
be triggered by an explicit tevent_req_received()
in the _recv() function. The TEVENT_REQ_RECEIVED event
is only triggered once as tevent_req_received()
will remove the destructor.

So the difference compared to a custom destructor
is that the struct tevent_req itself can continue
to be there, while tevent_req_received() removed
all internal state.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: add/use tevent_req_destructor
Stefan Metzmacher [Fri, 27 Sep 2013 01:41:29 +0000 (03:41 +0200)]
tevent: add/use tevent_req_destructor

This makes sure we call tevent_req_received(req) on talloc_free()
and cleanup things in a defined order.

Note that some callers used their own destructor for their
tevent_req instance, they'll just overwrite this,
which is not intended, but works without problems.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: add doxygen comments for tevent_num_signals() and tevent_sa_info_queue_count()
Stefan Metzmacher [Wed, 8 Jan 2014 09:01:56 +0000 (10:01 +0100)]
tevent: add doxygen comments for tevent_num_signals() and tevent_sa_info_queue_count()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotevent: Add prototypes
Volker Lendecke [Fri, 13 Dec 2013 10:59:04 +0000 (11:59 +0100)]
tevent: Add prototypes

... doxygen docs to be filled in :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotevent: Only build "std_fallback_to_poll" when epoll is around
Volker Lendecke [Fri, 13 Dec 2013 10:59:43 +0000 (11:59 +0100)]
tevent: Only build "std_fallback_to_poll" when epoll is around

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotevent: fix crash bug in tevent_queue_immediate_trigger()
Stefan Metzmacher [Sat, 11 Jan 2014 07:58:05 +0000 (08:58 +0100)]
tevent: fix crash bug in tevent_queue_immediate_trigger()

Assume we we have a queue with 2 entries (A and B with triggerA() and triggerB()).
If triggerA() removes itself tevent_queue_entry_destructor() will be called
for A, this schedules the immediate event to call triggerB().
If triggerA() then also removes B by an explicit of implizit talloc_free(),
q->list is NULL, but the immediate event is still scheduled and can't be unscheduled.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agoctdb/eventscripts: Move all eventscript state under $CTDB_VARDIR/state
Martin Schwenke [Wed, 18 Dec 2013 06:08:55 +0000 (17:08 +1100)]
ctdb/eventscripts: Move all eventscript state under $CTDB_VARDIR/state

Services can be flagged for reconfigure when they release IPs at
shutdown.  The flag is never removed and the service is prematurely
reconfigured during the first "ipreallocated" event, before any IPs
are hosted and before the "startup" event has actually started the
services.

$CTDB_VARDIR/state directly contained the service state subdirectories
and is already removed in the "init" event.  Just push the service
state subdirectories down a level and put everything else in a
subdirectory.

This way all the eventscript state gets cleaned up every time CTDB
starts up.

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 Jan 17 09:58:26 CET 2014 on sn-devel-104

10 years agoctdb/daemon: Untangle serialisation of 1st recovery -> startup -> monitor
Martin Schwenke [Wed, 18 Dec 2013 04:37:11 +0000 (15:37 +1100)]
ctdb/daemon: Untangle serialisation of 1st recovery -> startup -> monitor

At the moment ctdb_check_healthy() is overloaded to wait until the
first recovery is complete, handle the "startup" event and also
actually handle monitoring.  This is untidy and hard to follow.

Instead, have the daemon explicitly wait for 1st recovery after the
"setup" event.  When first recovery is complete, schedule a function
to handle the "startup" event.  When the "startup" event succeeds then
explicitly enable monitoring.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb/eventscripts: Print a count if killing TCP connections times out
Martin Schwenke [Mon, 13 Jan 2014 05:34:50 +0000 (16:34 +1100)]
ctdb/eventscripts: Print a count if killing TCP connections times out

Also update related test

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb/eventscripts: Reconfigure lock should be released quickly
Martin Schwenke [Wed, 18 Dec 2013 02:51:22 +0000 (13:51 +1100)]
ctdb/eventscripts: Reconfigure lock should be released quickly

Currently the lock is held until the corresponding eventscript
completes, since the process still exists.  If the regular part of an
eventscript hangs then the lock might unnecessarily be held for a long
time.  The pathological case is when a monitor event gets stuck in
D-wait state and the script times out but can't be killed so the lock
is still held.  This can cause an unwanted monitor replay.

Change this so that the lock is released immediately after the
reconfiguration is complete.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb/recoverd: Do not refuse disabling takeover runs on inactive nodes
Martin Schwenke [Wed, 18 Dec 2013 08:15:39 +0000 (19:15 +1100)]
ctdb/recoverd: Do not refuse disabling takeover runs on inactive nodes

Failure might be expected when disabling takeover runs on banned
nodes, since they might be suffering from performance problems or
similar.  More broadly, administrators who reconfigure a cluster that
isn't in a happy state aren't necessarily doing something sensible.

However, allowing takeover runs to be disabled on inactive nodes stops
reconfiguration of stopped nodes.  This is probaby an unreasonable
limitation, so drop it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
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