samba.git
5 years agoselftest/Samba4: also bind to ipv6
Stefan Metzmacher [Thu, 19 Jun 2014 15:21:16 +0000 (17:21 +0200)]
selftest/Samba4: also bind to ipv6

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: export _IPV6 environment variables
Stefan Metzmacher [Thu, 19 Jun 2014 15:21:16 +0000 (17:21 +0200)]
selftest: export _IPV6 environment variables

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolibcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for now
Stefan Metzmacher [Thu, 10 Jul 2014 05:25:08 +0000 (07:25 +0200)]
libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log level for now

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolibcli/dns: add AAAA support to dns_hosts_file.c
Stefan Metzmacher [Thu, 10 Jul 2014 05:25:08 +0000 (07:25 +0200)]
libcli/dns: add AAAA support to dns_hosts_file.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()
Stefan Metzmacher [Wed, 30 Jul 2014 15:57:13 +0000 (17:57 +0200)]
s4:dlz_bind9: do an early talloc_free(el_ctx) in dlz_allnodes()

We don't have to keep everything arround while walking the whole zone.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dlz_bind9: avoid some compiler warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:59:51 +0000 (09:59 +0100)]
s4:dlz_bind9: avoid some compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: handle tombstones in handle_one_update()
Stefan Metzmacher [Thu, 31 Jul 2014 07:35:26 +0000 (09:35 +0200)]
s4:dns_server: handle tombstones in handle_one_update()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()
Stefan Metzmacher [Thu, 31 Jul 2014 08:44:41 +0000 (10:44 +0200)]
s4:dns_server: add DNS_TYPE_TOMBSTONE support to dns_common_replace()

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

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: make sure dns_common_lookup() doesn't return tombstones
Stefan Metzmacher [Thu, 31 Jul 2014 06:54:17 +0000 (08:54 +0200)]
s4:dns_server: make sure dns_common_lookup() doesn't return tombstones

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()
Stefan Metzmacher [Thu, 31 Jul 2014 07:32:00 +0000 (09:32 +0200)]
s4:dns_server: use .wType = DNS_TYPE_TOMBSTONE instead of ZERO_STRUCT()

The result is the same, but it is clearer.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: split out dns_common_replace()
Stefan Metzmacher [Wed, 30 Jul 2014 16:27:56 +0000 (18:27 +0200)]
s4:dns_server: split out dns_common_replace()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: remove const from dns_replace_records()
Stefan Metzmacher [Thu, 31 Jul 2014 09:32:02 +0000 (11:32 +0200)]
s4:dns_server: remove const from dns_replace_records()

All callers are find we the record array gets modified.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: split out dns_common_extract() and dns_common_lookup()
Stefan Metzmacher [Wed, 30 Jul 2014 06:24:10 +0000 (08:24 +0200)]
s4:dns_server: split out dns_common_extract() and dns_common_lookup()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: split out a private 'dnsserver_common' library
Stefan Metzmacher [Wed, 30 Jul 2014 06:01:11 +0000 (08:01 +0200)]
s4:dns_server: split out a private 'dnsserver_common' library

This will contain common code for the internal dns server, the dlz_bind9 module
and the rpc dns management server.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXIST
Stefan Metzmacher [Thu, 31 Jul 2014 06:19:50 +0000 (08:19 +0200)]
s4:dns_server: map LDB_ERR_NO_SUCH_OBJECT to WERR_DNS_ERROR_NAME_DOES_NOT_EXIST

This is the correct fix for commit 8b24c43b382740106474e26dec59e1419ba77306
and Bug: https://bugzilla.samba.org/show_bug.cgi?id=9559

With this change we have a consistent behavior between internal server
and the bind dlz module. We keep a dangling LDAP object without
dnsRecord attribute arround forever. This will be fixed in the following
commits.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()
Stefan Metzmacher [Wed, 30 Jul 2014 15:55:57 +0000 (17:55 +0200)]
s4:dns_server: handle WERR_DNS_ERROR_NAME_DOES_NOT_EXIST in werr_to_dns_err()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosmbd: Properly initialize mangle_hash
Volker Lendecke [Tue, 19 Aug 2014 14:32:15 +0000 (14:32 +0000)]
smbd: Properly initialize mangle_hash

[Bug 10782] mangle_hash() can fail to initialize charset (smbd crash).

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

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): Tue Aug 26 01:30:38 CEST 2014 on sn-devel-104

5 years agopassdb: fix NT_STATUS_NO_SUCH_GROUP
Arvid Requate [Thu, 17 Jan 2013 15:44:28 +0000 (16:44 +0100)]
passdb: fix NT_STATUS_NO_SUCH_GROUP

Share options like "force group" and "valid users = @group1"
triggered a NT_STATUS_NO_SUCH_GROUP. While the group was found in
the SAM backend, its objectclass was not retrived.

This fix also revealed a talloc access after free in the group
branch of pdb_samba_dsdb_getgrfilter.

[Bug 9570] Access failure for shares with "force group" or "valid users = @group"

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

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoDon't discard result of checking grouptype
Roel van Meer [Fri, 22 Aug 2014 13:11:04 +0000 (15:11 +0200)]
Don't discard result of checking grouptype

The pdb_samba_dsdb_getgrfilter() function first determines the security type
of a group and sets map->sid_name_use accordingly. A little later, this
variable is set again, undoing the previous work.

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

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 23 02:48:52 CEST 2014 on sn-devel-104

5 years agomessaging3: Avoid messaging_is_self_send
Volker Lendecke [Thu, 21 Aug 2014 18:41:49 +0000 (18:41 +0000)]
messaging3: Avoid messaging_is_self_send

This was a bad API, and it was used in a buggy way: In
messaging_dispatch_rec we always did the defer, we referenced the
destination pid, not the source. In messaging_send_iov this is the right
thing to do to reference the destination, but when we have arrived in
messaging_dispatch_rec we should compare source and destination.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Introduce server_id_same_process()
Volker Lendecke [Thu, 21 Aug 2014 18:36:33 +0000 (18:36 +0000)]
lib: Introduce server_id_same_process()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopthreadpool: Slightly serialize jobs
Volker Lendecke [Thu, 21 Aug 2014 19:55:06 +0000 (19:55 +0000)]
pthreadpool: Slightly serialize jobs

Using the new msg_source program with 1.500 instances against a single
msg_sink I found the msg_source process to spawn two worker threads for
synchronously sending the data towards the receiving socket. This should
not happen: Per destination node we only create one queue. We strictly
only add pthreadpool jobs one after the other, so a single helper thread
should be perfectly sufficient.

It turned out that under heavy overload the main sending thread was
scheduled before the thread that just had finished its send() job. So
the helper thread was not able to increment the pool->num_idle variable
indicating that we don't have to create a new thread when the new job
is added.

This patch moves the signalling write under the mutex. This means that
indicating readiness via the pipe and the pool->num_idle variable happen both
under the same mutex lock and thus are atomic. No superfluous threads anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Add msg_sink/source -- perftest
Volker Lendecke [Thu, 21 Aug 2014 14:32:07 +0000 (14:32 +0000)]
messaging3: Add msg_sink/source -- perftest

With this pair of programs I did some performance tests of the messaging
system. Guess what -- I found two bugs :-)

See the subsequent patches.

With 1500 msg_source processes I can generate message overload: A

Intel(R) Xeon(R) CPU           L5640  @ 2.27GHz

can receive roughly 100k messages per second. When using
messaging_read_send/recv user/system time is roughly even, a bit more
work done in user space. When using messaging_register, due to less
malloc activity, user space chews a lot less.

By the way: 1.500 helper threads in a blocking sendto() against a single
datagram socket reading as fast as it can (with epoll_wait in between)
only drove the loadavg to 12 on a 24-core machine. So I guess unix domain
datagram sockets are pretty well protected against overload. No thundering
herd or so. Interestingly "top" showed msg_sink at less than 90% CPU,
although it was clearly the bottleneck. But that must be a "top" artifact.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest/Samba4: avoid warnings about 'path' not specified on 'ntvfs handler = cifs...
Stefan Metzmacher [Wed, 6 Aug 2014 14:54:43 +0000 (16:54 +0200)]
selftest/Samba4: avoid warnings about 'path' not specified on 'ntvfs handler = cifs' shares

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Fix cleanup2 to utilize on-demand cleanup
Volker Lendecke [Wed, 20 Aug 2014 09:53:28 +0000 (09:53 +0000)]
torture: Fix cleanup2 to utilize on-demand cleanup

Now we check the cleanup when conflicts happen, not when we first open
the file. This means we don't have to re-open the connection to make
cleanup happen.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Run the cleanup2 test against 2 nodes
Volker Lendecke [Wed, 20 Aug 2014 09:52:39 +0000 (09:52 +0000)]
torture: Run the cleanup2 test against 2 nodes

This enables testing the brlock cleanup across ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agobrlock: Remove validate_lock_entries
Volker Lendecke [Wed, 20 Aug 2014 09:07:14 +0000 (09:07 +0000)]
brlock: Remove validate_lock_entries

This is now only called during brl_forall. It does not really hurt if we list
dead processes here. If the upper layers really care, they can filter it out
themselves. The real lock conflicts are not removed on-demand.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agobrlock: Do auto-cleanup at conflict time
Volker Lendecke [Tue, 19 Aug 2014 12:36:55 +0000 (12:36 +0000)]
brlock: Do auto-cleanup at conflict time

This avoids the need to do sweeping validate_lock_entries calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: smbd: POSIX ACLs. Remove incorrect check for SECINFO_PROTECTED_DACL in incoming...
Jeremy Allison [Thu, 21 Aug 2014 23:28:42 +0000 (16:28 -0700)]
s3: smbd: POSIX ACLs. Remove incorrect check for SECINFO_PROTECTED_DACL in incoming security_information flags in posix_get_nt_acl_common().

Tidy-up of code obsoleted by fixes for bug #10773 (SECINFO_PROTECTED_DACL is not ignored).
We now never pass SECINFO_PROTECTED_DACL in security_information flags to this layer.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 22 11:26:57 CEST 2014 on sn-devel-104

5 years agomessaging_dgm: Factor out messaging_dgm_lockfile_name
Volker Lendecke [Sat, 2 Aug 2014 11:26:44 +0000 (13:26 +0200)]
messaging_dgm: Factor out messaging_dgm_lockfile_name

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 Aug 22 05:20:43 CEST 2014 on sn-devel-104

5 years agomessaging_dgm: Use %ju to fill lockfile
Volker Lendecke [Sat, 2 Aug 2014 11:57:43 +0000 (13:57 +0200)]
messaging_dgm: Use %ju to fill lockfile

... much nicer than PRIu64

Also, append a \n. Makes it better readable when looking at the lockfile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in get_sec_info()
Stefan Metzmacher [Wed, 20 Aug 2014 13:00:59 +0000 (15:00 +0200)]
libcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in get_sec_info()

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

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): Fri Aug 22 02:52:50 CEST 2014 on sn-devel-104

5 years agos3:smbd: mask security_information input values with SMB_SUPPORTED_SECINFO_FLAGS
Stefan Metzmacher [Wed, 20 Aug 2014 11:58:38 +0000 (13:58 +0200)]
s3:smbd: mask security_information input values with SMB_SUPPORTED_SECINFO_FLAGS

Sometimes Windows clients doesn't filter SECINFO_[UN]PROTECTED_[D|S]ACL flags
before sending the security_information to the server.

security_information = SECINFO_PROTECTED_DACL| SECINFO_DACL
results in a NULL dacl being returned from an GetSecurityDecriptor
request. This happens because posix_get_nt_acl_common()
has the following logic:

if ((security_info & SECINFO_DACL) && !(security_info & SECINFO_PROTECTED_DACL)) {
    ... create DACL ...
}

I'm not sure if the logic is correct or wrong in this place (I guess it's
wrong...).

But what I know is that the SMB server should filter the given
security_information flags before passing to the filesystem.

[MS-SMB2] 3.3.5.20.3 Handling SMB2_0_INFO_SECURITY
...
The server MUST ignore any flag value in the AdditionalInformation field that
is not specified in section 2.2.37.

Section 2.2.37 lists:
OWNER_SECURITY_INFORMATION
GROUP_SECURITY_INFORMATION
DACL_SECURITY_INFORMATION
SACL_SECURITY_INFORMATION
LABEL_SECURITY_INFORMATION
ATTRIBUTE_SECURITY_INFORMATION
SCOPE_SECURITY_INFORMATION
BACKUP_SECURITY_INFORMATION

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agosecurity.idl: add SMB_SUPPORTED_SECINFO_FLAGS
Stefan Metzmacher [Wed, 20 Aug 2014 11:43:13 +0000 (13:43 +0200)]
security.idl: add SMB_SUPPORTED_SECINFO_FLAGS

A SMB server should only care about specific SECINFO flags
and ignore others e.g. SECINFO_PROTECTED_DACL.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3:libsmb: Set a max charge for SMB2 connections
Ross Lagerwall [Thu, 21 Aug 2014 06:32:36 +0000 (07:32 +0100)]
s3:libsmb: Set a max charge for SMB2 connections

Set a max charge for SMB2 connections so that larger request sizes can
be used and more requests can be in flight.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Aug 21 17:31:11 CEST 2014 on sn-devel-104

5 years agosmbcontrol: Fix a typo
Volker Lendecke [Mon, 18 Aug 2014 08:24:35 +0000 (08:24 +0000)]
smbcontrol: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <Ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Aug 21 14:58:37 CEST 2014 on sn-devel-104

5 years agosmbd: Only DEBUG errors from messaging_cleanup
Volker Lendecke [Mon, 18 Aug 2014 11:59:00 +0000 (11:59 +0000)]
smbd: Only DEBUG errors from messaging_cleanup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
5 years agomessaging3: Don't print a message if there's nothing to clean up
Volker Lendecke [Mon, 18 Aug 2014 11:58:05 +0000 (11:58 +0000)]
messaging3: Don't print a message if there's nothing to clean up

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
5 years agolib: Check socket length in ctdbd_connect
Volker Lendecke [Tue, 19 Aug 2014 09:20:49 +0000 (09:20 +0000)]
lib: Check socket length in ctdbd_connect

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ronnie sahlberg <ronniesahlberg@gmail.com>
5 years agos4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filter
Amitay Isaacs [Wed, 30 Jul 2014 09:57:42 +0000 (19:57 +1000)]
s4-rpc: dnsserver: Do not return NS_GLUE records with VIEW_GLUE_DATA filter

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 21 11:36:55 CEST 2014 on sn-devel-104

5 years agos4-rpc: dnsserver: Correctly set rank for glue NS records
Amitay Isaacs [Wed, 30 Jul 2014 08:53:44 +0000 (18:53 +1000)]
s4-rpc: dnsserver: Correctly set rank for glue NS records

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoctdb-build: Add missing dependency on popt
Amitay Isaacs [Thu, 21 Aug 2014 04:47:23 +0000 (14:47 +1000)]
ctdb-build: Add missing dependency on popt

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoctdb-build: Remove unnecessary third_party symlink
Amitay Isaacs [Thu, 21 Aug 2014 04:46:54 +0000 (14:46 +1000)]
ctdb-build: Remove unnecessary third_party symlink

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoldb: Fix check for third_party
Amitay Isaacs [Thu, 21 Aug 2014 04:34:03 +0000 (14:34 +1000)]
ldb: Fix check for third_party

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agowafsamba: Correctly locate the 'third_party' directory
Amitay Isaacs [Thu, 21 Aug 2014 04:33:42 +0000 (14:33 +1000)]
wafsamba: Correctly locate the 'third_party' directory

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoctdb-build: Avoid unused variable warning in output from rpcgen
Martin Schwenke [Mon, 4 Aug 2014 04:52:00 +0000 (14:52 +1000)]
ctdb-build: Avoid unused variable warning in output from rpcgen

  default/ctdb/utils/smnotify/gen_xdr.c: In function ‘xdr_status’:
  default/ctdb/utils/smnotify/gen_xdr.c:11:20: warning: unused variable ‘buf’ [-Wunused-variable]
    register int32_t *buf;
                      ^

When generating the code, change it to assign the variable to itself.

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): Thu Aug 21 07:11:02 CEST 2014 on sn-devel-104

5 years agoctdb-daemon: Fix some strict-aliasing warnings
Martin Schwenke [Mon, 4 Aug 2014 04:50:17 +0000 (14:50 +1000)]
ctdb-daemon: Fix some strict-aliasing warnings

Seeing these with -Wall:

  ../server/ctdb_call.c:1117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     record_flags = *(uint32_t *)&c->data[c->keylen + c->datalen];
     ^

memcpy() seems to be the easiest way to get fix these.  The
alternative would be to use unmarshalling functions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-util: Fix warning about ignored result from system()
Martin Schwenke [Wed, 30 Jul 2014 11:10:01 +0000 (21:10 +1000)]
ctdb-util: Fix warning about ignored result from system()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb: Use sys_read() and sys_write() to ensure correct signal interaction
Martin Schwenke [Wed, 30 Jul 2014 11:03:53 +0000 (21:03 +1000)]
ctdb: Use sys_read() and sys_write() to ensure correct signal interaction

... and avoid compiler warnings in some cases.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-common: Copy functions sys_read() and sys_write() from source3
Martin Schwenke [Wed, 30 Jul 2014 10:50:59 +0000 (20:50 +1000)]
ctdb-common: Copy functions sys_read() and sys_write() from source3

We really should extricate these from source3 and into some common
code.  However, just copy them for now to help get rid of a lot of
warnings.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Be more helpful when CTDB CLI tool is run on unconfigured node
Martin Schwenke [Wed, 20 Aug 2014 23:26:39 +0000 (09:26 +1000)]
ctdb-tools: Be more helpful when CTDB CLI tool is run on unconfigured node

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Factor out new function find_node_xpnn() from control_xpnn()
Martin Schwenke [Fri, 8 Aug 2014 00:43:44 +0000 (10:43 +1000)]
ctdb-tools: Factor out new function find_node_xpnn() from control_xpnn()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoreplace: Remove unused item returned by FAILED()
Martin Schwenke [Thu, 31 Jul 2014 01:03:59 +0000 (11:03 +1000)]
replace: Remove unused item returned by FAILED()

The (return) value of FAILED() is a constant 1.  However, it is never
used, so the compiler complains when run with -Wall:

  lib/replace/test/os2_delete.c: In function ‘cleanup’:
  lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value]
   FAILED("system");

So just get remove the ", 1" since it is the bit that does nothing and
is never used.

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): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104

5 years agos4:torture:vfs_fruit: add tests for resource fork IO
Ralph Boehme [Fri, 11 Jul 2014 10:58:37 +0000 (12:58 +0200)]
s4:torture:vfs_fruit: add tests for resource fork IO

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug 18 20:08:32 CEST 2014 on sn-devel-104

5 years agos4:torture:vfs_fruit: add test writing Netatalk metadata
Ralph Boehme [Thu, 10 Jul 2014 14:40:28 +0000 (16:40 +0200)]
s4:torture:vfs_fruit: add test writing Netatalk metadata

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture:vfs_fruit: add test reading Netatalk metadata
Ralph Boehme [Tue, 8 Jul 2014 03:50:09 +0000 (05:50 +0200)]
s4:torture:vfs_fruit: add test reading Netatalk metadata

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture: add boilerplate code for vfs_fruit
Ralph Boehme [Tue, 8 Jul 2014 03:47:02 +0000 (05:47 +0200)]
s4:torture: add boilerplate code for vfs_fruit

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture: add wrapper functions
Ralph Boehme [Tue, 8 Jul 2014 03:39:49 +0000 (05:39 +0200)]
s4:torture: add wrapper functions

Add wrapper functions that connect two trees with sharenames taken
from passed option.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture: add boilerplate code for testing specific VFS modules
Ralph Boehme [Tue, 8 Jul 2014 03:36:46 +0000 (05:36 +0200)]
s4:torture: add boilerplate code for testing specific VFS modules

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture:smb2: add utility function torture_smb2_con_sopt()
Ralph Boehme [Fri, 27 Jun 2014 23:09:58 +0000 (01:09 +0200)]
s4:torture:smb2: add utility function torture_smb2_con_sopt()

Add a utility function that takes an option name as parameter and then
uses the value of the option 'torture:NAME' as share name in a tree
connect.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agovfs_fruit: add manpage
Ralph Boehme [Mon, 23 Jun 2014 15:01:30 +0000 (17:01 +0200)]
vfs_fruit: add manpage

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoNew VFS module vfs_fruit
Ralph Boehme [Mon, 23 Jun 2014 14:59:45 +0000 (16:59 +0200)]
New VFS module vfs_fruit

This module provides enhanced compatibility with Apple SMB clients and
interoperability with a Netatalk 3 AFP fileserver.

The module intercepts the OS X special streams "AFP_AfpInfo" and
"AFP_Resource" and handles them in a special way. All other named
streams are deferred to vfs_streams_xattr.

The OS X client maps all NTFS illegal characters to the Unicode
private range. This module optionally stores the charcters using their
native ASCII encoding.

Open modes are optionally checked against Netatalk AFP share modes.

The "AFP_AfpInfo" named stream is a binary blob containing OS X
extended metadata for files and directories. This module optionally
reads and stores this metadata in a way compatible with Netatalk 3
which stores the metadata in an EA "org.netatalk.metadata". Cf
source3/include/MacExtensions.h for a description of the binary blobs
content.

The "AFP_Resource" named stream may be arbitrarily large, thus it
can't be stored in an EA on most filesystem. ZFS on Solaris is an
exception to the rule, because it there EAs can be of any size and EAs
are first-class filesystem objects that can be used with normal file
syscalls like open(), read(), write(), fcntl() asf. This module stores
the AFP_Resource stream in an AppleDouble file, prepending "._" to the
filename. On Solaris and ZFS the stream is optionally stored in an EA
"org.netatalk.ResourceFork".

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoFix AFP_BackupTime byte order and use ISO C99 integer types
Ralph Boehme [Thu, 10 Jul 2014 14:32:15 +0000 (16:32 +0200)]
Fix AFP_BackupTime byte order and use ISO C99 integer types

AFP_BackupTime value must be 0x80000000 and all existing defines use
native byte order, not byte swapped.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture: use torture_assert instead of torture_comment and return in defer_open...
Michael Adam [Mon, 18 Aug 2014 13:10:15 +0000 (15:10 +0200)]
s4:torture: use torture_assert instead of torture_comment and return in defer_open test

The fix missed one instance, as autobuild has just told me...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Aug 18 17:42:00 CEST 2014 on sn-devel-104

5 years agobuild: fix configure to honour --without-dmapi
Michael Adam [Mon, 18 Aug 2014 09:42:27 +0000 (11:42 +0200)]
build: fix configure to honour --without-dmapi

Previously, --without-dmapi would still autodetect and link a useable dmapi
library. This change allows to build without dmapi support even when a dmapi
library is found.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agotdbtorture: print details when run with -n 1
David Disseldorp [Fri, 15 Aug 2014 12:47:49 +0000 (14:47 +0200)]
tdbtorture: print details when run with -n 1

Currently tdbtorture prints the test details (processes, loops, etc.)
from the first forked child process.
When run with -n 1 (one process), the test is run from within the
parent and no details are printed. This change ensures that they are.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Aug 18 13:26:32 CEST 2014 on sn-devel-104

5 years agodsdb: Also redact the clearTextPassword input-only attribute
Andrew Bartlett [Fri, 21 Feb 2014 02:24:24 +0000 (15:24 +1300)]
dsdb: Also redact the clearTextPassword input-only attribute

We go to a great deal of effort to avoid administrators posting their
passwords in Samba logs, and one of the ways we do that is to remove
them from internal ldif dumps Samba produces while operating as an AD
DC.

clearTextPassword is not a real attribute, but it functions as one for
an input path.

Change-Id: Iaacf3354fc9bfff18d6774f49b17a9ba962347d5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Aug 16 01:05:07 CEST 2014 on sn-devel-104

5 years agolib: Remove parser code, now replaced with tini parser.
Volker Lendecke [Fri, 15 Aug 2014 05:50:48 +0000 (05:50 +0000)]
lib: Remove parser code, now replaced with tini parser.

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 Aug 15 20:34:56 CEST 2014 on sn-devel-104

5 years agolibrpc: Remove obsolete idl-deps script.
Jelmer Vernooij [Fri, 6 Dec 2013 02:15:47 +0000 (02:15 +0000)]
librpc: Remove obsolete idl-deps script.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 15 05:47:51 CEST 2014 on sn-devel-104

5 years agoRemove iniparser.
Jeremy Allison [Wed, 13 Aug 2014 23:41:33 +0000 (16:41 -0700)]
Remove iniparser.

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): Thu Aug 14 23:52:07 CEST 2014 on sn-devel-104

5 years agoRemove popt/iniparser from .clang_complete
Jeremy Allison [Thu, 14 Aug 2014 18:12:30 +0000 (18:12 +0000)]
Remove popt/iniparser from .clang_complete

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoDon't build iniparser anymore.
Jeremy Allison [Wed, 13 Aug 2014 23:40:40 +0000 (16:40 -0700)]
Don't build iniparser anymore.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoReplace all uses of iniparser with tiniparser.
Jeremy Allison [Wed, 13 Aug 2014 23:36:28 +0000 (16:36 -0700)]
Replace all uses of iniparser with tiniparser.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoAdd tiniparser - tiny version of iniparser that only implements what Samba uses.
Jeremy Allison [Wed, 13 Aug 2014 23:00:00 +0000 (16:00 -0700)]
Add tiniparser - tiny version of iniparser that only implements what Samba uses.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoUse tini in preference.
Volker Lendecke [Wed, 13 Aug 2014 05:24:21 +0000 (07:24 +0200)]
Use tini in preference.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoAdd tini parser.
Volker Lendecke [Tue, 12 Aug 2014 11:02:35 +0000 (13:02 +0200)]
Add tini parser.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoctdb-readonly: Do not abort if revoke of readonly record fails on a node
Amitay Isaacs [Tue, 12 Aug 2014 13:58:00 +0000 (23:58 +1000)]
ctdb-readonly: Do not abort if revoke of readonly record fails on a node

Revoking readonly record involves first marking the record on dmaster as
RO_REVOKING_READONLY.  Then all the other nodes are sent update_record
control to get rid of RO_DELEGATION.  Once that succeeds, the record
is marked RO_REVOKING_COMPLETE.

Currently, revoking of readonly delegations on the nodes is tried only
once.  If a node goes in recovery, it can fail update_record control and
revoke code will abort ctdb.  Since database recovery would revoke all
readonly delegations anyway, there is no reason to abort.  Simply undo
the start of revoke process by resetting RO_REVOKING_READONLY flag.

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): Wed Aug 13 11:24:09 CEST 2014 on sn-devel-104

5 years agoctdb-readonly: Add an early return to simplify code
Amitay Isaacs [Tue, 12 Aug 2014 13:54:39 +0000 (23:54 +1000)]
ctdb-readonly: Add an early return to simplify code

This patch makes the subsequent logic change small and easier to
understand.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-doc: Fix default database directories in ctdbd.1
Martin Schwenke [Sun, 10 Aug 2014 09:02:42 +0000 (19:02 +1000)]
ctdb-doc: Fix default database directories in ctdbd.1

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): Wed Aug 13 07:06:42 CEST 2014 on sn-devel-104

5 years agoFixed a memory leak in cli_set_mntpoint().
Har Gagan Sahai [Wed, 6 Aug 2014 09:02:35 +0000 (14:32 +0530)]
Fixed a memory leak in cli_set_mntpoint().

Fixes bug #10759 - Memory leak in libsmbclient in cli_set_mntpoint function

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

Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-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 Aug 13 04:36:50 CEST 2014 on sn-devel-104

5 years agomessaging3: Include messages_dgm.h only in messages.c
Volker Lendecke [Sun, 27 Jul 2014 10:31:21 +0000 (12:31 +0200)]
messaging3: Include messages_dgm.h only in messages.c

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): Tue Aug 12 02:21:32 CEST 2014 on sn-devel-104

5 years agomessaging3: Move messaging_hdr handling to messages.c.
Volker Lendecke [Sun, 27 Jul 2014 10:29:26 +0000 (12:29 +0200)]
messaging3: Move messaging_hdr handling to messages.c.

This makes messages_dgm a simple byte-transport across processes that
knows almost nothing about server_id etc.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Only store the pid in messaging_dgm_context
Volker Lendecke [Fri, 25 Jul 2014 11:03:11 +0000 (11:03 +0000)]
messaging3: Only store the pid in messaging_dgm_context

That's all we need here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Save 48 bytes .text
Volker Lendecke [Fri, 25 Jul 2014 10:42:19 +0000 (10:42 +0000)]
messaging3: Save 48 bytes .text

5 years agomessaging3: Remove one-context protection from messages.c
Volker Lendecke [Sat, 9 Aug 2014 15:18:04 +0000 (17:18 +0200)]
messaging3: Remove one-context protection from messages.c

messages_dgm.c takes care of it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Protect messaging_dgm against multiple contexts
Volker Lendecke [Sun, 20 Jul 2014 12:51:47 +0000 (14:51 +0200)]
messaging3: Protect messaging_dgm against multiple contexts

We can't rely on posix locking within a process

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Add messages_dgm.h
Volker Lendecke [Thu, 17 Jul 2014 11:57:51 +0000 (11:57 +0000)]
messaging3: Add messages_dgm.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Pass on msg_type unmasked
Volker Lendecke [Thu, 17 Jul 2014 11:56:18 +0000 (11:56 +0000)]
messaging3: Pass on msg_type unmasked

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: I don't see 2 versions running concurrently...
Volker Lendecke [Thu, 17 Jul 2014 11:55:33 +0000 (11:55 +0000)]
messaging3: I don't see 2 versions running concurrently...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Avoid "enum messaging_type" in messages_dgm
Volker Lendecke [Thu, 17 Jul 2014 11:51:13 +0000 (11:51 +0000)]
messaging3: Avoid "enum messaging_type" in messages_dgm

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Pass dir_owner to messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:47:32 +0000 (11:47 +0000)]
messaging3: Pass dir_owner to messaging_dgm_init()

5 years agomessaging3: Pass cache_dir to messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:38:36 +0000 (11:38 +0000)]
messaging3: Pass cache_dir to messaging_dgm_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Move [un]become_root() calls out of messaging_dgm_send()
Volker Lendecke [Thu, 17 Jul 2014 11:34:24 +0000 (11:34 +0000)]
messaging3: Move [un]become_root() calls out of messaging_dgm_send()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Move sec_init() call out of messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:33:26 +0000 (11:33 +0000)]
messaging3: Move sec_init() call out of messaging_dgm_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Directly refer to messaging_dgm in messages.c
Volker Lendecke [Thu, 17 Jul 2014 11:23:46 +0000 (11:23 +0000)]
messaging3: Directly refer to messaging_dgm in messages.c

This removes the messaging_backend abstraction layer from messages_dgm.c. That
layer was introduced for ctdb and is still used there. But as the messaging_dgm
interface is very slim anyway, I don't think directly calling it is too bad.

Why this commit? It is another step towards making messages_dgm
independent of messages.[ch], thus it might become usable in other
contexts like ctdb and source4

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use messaging_cleanup()
Volker Lendecke [Thu, 17 Jul 2014 11:05:02 +0000 (11:05 +0000)]
smbd: Use messaging_cleanup()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Add messaging_cleanup
Volker Lendecke [Thu, 17 Jul 2014 11:01:00 +0000 (11:01 +0000)]
messaging3: Add messaging_cleanup

Rename smbcontrol's dgm-cleanup to msg-cleanup. We haven't published
this UI yet :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging_dgm: Remove unused "messaging_context"
Volker Lendecke [Thu, 17 Jul 2014 09:58:50 +0000 (09:58 +0000)]
messaging_dgm: Remove unused "messaging_context"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Explicitly pass server_id to messaging_dgm_init
Volker Lendecke [Thu, 17 Jul 2014 09:56:39 +0000 (09:56 +0000)]
messaging3: Explicitly pass server_id to messaging_dgm_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomessaging3: Explicitly pass tevent_context to messaging_dgm_init
Volker Lendecke [Thu, 17 Jul 2014 09:52:28 +0000 (09:52 +0000)]
messaging3: Explicitly pass tevent_context to messaging_dgm_init

One dependency less on messaging_context()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>