sfrench/samba-autobuild/.git
5 years agorwrap: Use the rwrap_fake_rr structure instead of raw uint8_t pointers.
Jakub Hrozek [Wed, 3 Dec 2014 14:45:03 +0000 (15:45 +0100)]
rwrap: Use the rwrap_fake_rr structure instead of raw uint8_t pointers.

Currently only one instance of the rwrap_fake_rr structure is used. Recursion
will be implemented in a future patch.

Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorwrap: Add data structures and functions to represent and manipulate RRs.
Jakub Hrozek [Wed, 3 Dec 2014 14:45:02 +0000 (15:45 +0100)]
rwrap: Add data structures and functions to represent and manipulate RRs.

Adds a structure that, using unions represents all supported RRs. Add a
bunch of utility functions that can be used to create these structures.

Currently the functions are unused.

Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorwrap: Correctly calculate the response size and return it.
Andreas Schneider [Wed, 3 Dec 2014 14:45:01 +0000 (15:45 +0100)]
rwrap: Correctly calculate the response size and return it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorwrap: Handle trailing dot in dns names.
Andreas Schneider [Wed, 3 Dec 2014 14:45:00 +0000 (15:45 +0100)]
rwrap: Handle trailing dot in dns names.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorwrap: Compare dns names case insensitive.
Jakub Hrozek [Wed, 3 Dec 2014 14:44:59 +0000 (15:44 +0100)]
rwrap: Compare dns names case insensitive.

Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: Add resolv_wrapper version 1.0.0.
Andreas Schneider [Wed, 3 Dec 2014 14:44:58 +0000 (15:44 +0100)]
lib: Add resolv_wrapper version 1.0.0.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: Add the normal dns name as an alias for the main DC.
Andreas Schneider [Wed, 3 Dec 2014 14:44:57 +0000 (15:44 +0100)]
selftest: Add the normal dns name as an alias for the main DC.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotestprogs: Set functional domain level to 2003.
Andreas Schneider [Fri, 5 Dec 2014 16:03:31 +0000 (17:03 +0100)]
testprogs: Set functional domain level to 2003.

The default changed to 2008r2 recently.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoctdb-tests: Need to drop public IPs in kill-failover tests
Martin Schwenke [Wed, 3 Dec 2014 01:10:07 +0000 (12:10 +1100)]
ctdb-tests: Need to drop public IPs in kill-failover tests

These tests simulate a dead node rather than a CTDB failure, so drop
IP addresses when killing a "node" to avoid problems with duplicates.

To cope with a CTDB failure a watchdog would be needed to ensure that
the public IPs are dropped when CTDB dies.  Let's not do that now.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Dec  5 23:29:39 CET 2014 on sn-devel-104

5 years agoctdb-daemon: Gratuitous ARP equivalent for IPv6 is neighbor advertisement
Martin Schwenke [Mon, 1 Dec 2014 23:57:12 +0000 (10:57 +1100)]
ctdb-daemon: Gratuitous ARP equivalent for IPv6 is neighbor advertisement

Not neighbour solicitation.  See:

  https://tools.ietf.org/html/rfc4861#section-4.4

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: More debug on SSH failure
Martin Schwenke [Wed, 3 Dec 2014 01:09:12 +0000 (12:09 +1100)]
ctdb-tests: More debug on SSH failure

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Make tcpdump output more verbose
Martin Schwenke [Mon, 1 Dec 2014 02:30:29 +0000 (13:30 +1100)]
ctdb-tests: Make tcpdump output more verbose

This helps with debugging.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Use ip neigh command instead of arp
Martin Schwenke [Sat, 29 Nov 2014 09:01:20 +0000 (20:01 +1100)]
ctdb-tests: Use ip neigh command instead of arp

Extend select_test_node_and_ips() to set $test_prefix in addition to
$test_ip.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Generalise the gratarp and tickle sniffing code for IPv6
Martin Schwenke [Mon, 1 Dec 2014 03:07:57 +0000 (14:07 +1100)]
ctdb-tests: Generalise the gratarp and tickle sniffing code for IPv6

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

5 years agoctdb-tests: Match IPv6 connections in netstat output
Martin Schwenke [Mon, 1 Dec 2014 02:51:47 +0000 (13:51 +1100)]
ctdb-tests: Match IPv6 connections in netstat output

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Use ping_wrapper to do relevant ping or ping6
Martin Schwenke [Mon, 1 Dec 2014 02:50:42 +0000 (13:50 +1100)]
ctdb-tests: Use ping_wrapper to do relevant ping or ping6

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Extend regexps to handle IPv6 address matching
Martin Schwenke [Wed, 3 Dec 2014 04:58:20 +0000 (15:58 +1100)]
ctdb-tests: Extend regexps to handle IPv6 address matching

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Bracket IP addresses in NFS mounts and scp command (for IPv6)
Martin Schwenke [Wed, 3 Dec 2014 04:57:35 +0000 (15:57 +1100)]
ctdb-tests: Bracket IP addresses in NFS mounts and scp command (for IPv6)

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Try to handle IPv6 addresses for local daemons
Martin Schwenke [Wed, 26 Nov 2014 10:32:22 +0000 (21:32 +1100)]
ctdb-tests: Try to handle IPv6 addresses for local daemons

If CTDB_USE_IPV6 is set then use IPv6 addresses for nodes and public
IPs.  This can be useful for some simple tests.  However, the node
address actually needs to be on lo so that ctdbd can bind to the port
on that address, so they actually need to be added as root before
running tests, like this:

  for i in $(seq 1 10) ; do ip addr add "fc00:10::${i}/64" dev lo ; done

IPv4 127.0.0.0/8 addresses are somehow magic and only one needs to be
on lo so that many can be bound to.

Also change the IPv4 node addresses to be (slightly) more exotic.

For both IPv4 and IPv6, choose addresses that are compatible with
socket wrapper.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (socket wrapper fixes)
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net> (socket wrapper fixes)
5 years agoctdb-tests: Extend regexp to match IPv6 addresses
Martin Schwenke [Wed, 26 Nov 2014 10:31:42 +0000 (21:31 +1100)]
ctdb-tests: Extend regexp to match IPv6 addresses

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Bracket IP addresses in onnode (for IPv6)
Martin Schwenke [Fri, 28 Nov 2014 10:49:08 +0000 (21:49 +1100)]
ctdb-tools: Bracket IP addresses in onnode (for IPv6)

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-daemon: Fix IP address comparisons for IPv6 addresses
Amitay Isaacs [Tue, 25 Nov 2014 01:38:23 +0000 (12:38 +1100)]
ctdb-daemon: Fix IP address comparisons for IPv6 addresses

Before storing node IP address, convert into the correct abbreviated
string form for IPv6 addresses.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-scripts: Wait until IPv6 addresses are not "tentative"
Martin Schwenke [Fri, 21 Nov 2014 06:33:21 +0000 (17:33 +1100)]
ctdb-scripts: Wait until IPv6 addresses are not "tentative"

There are a few potential failure modes when adding an IPv6 address.
It takes a little while of duplicate address detection to complete, so
wait for a while.  After a timeout, also need to check to see if
duplicate address detection failed - if it did then actually drop the
IP address.

This really needs some careful thinking.  If CTDB disappears on a node
but the node's IP addresses are still on interfaces then the above
failure mode could cause the takeover nodes to become banned.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-eventscripts: Specify broadcast optionally to ip addr add
Amitay Isaacs [Thu, 20 Nov 2014 10:58:31 +0000 (21:58 +1100)]
ctdb-eventscripts: Specify broadcast optionally to ip addr add

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-daemon: Trust vnn->interface for an IP when releasing it
Martin Schwenke [Fri, 21 Nov 2014 03:52:47 +0000 (14:52 +1100)]
ctdb-daemon: Trust vnn->interface for an IP when releasing it

ctdb_sys_find_ifname() doesn't work for IPv6 addresses so don't use
it.

Trust the eventscript to do sanity checking on the interface.  Current
warnings are replaced with equivalents generated by the eventscript.
The unlikely message:

  Public IP %s is hosted on interface %s but we have no VNN

will be replaced by:

  WARNING: Public IP %s hosted on interface %s but VNN says __none__

which is clear enough.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Make 10.interface IPv6-safe
Martin Schwenke [Fri, 21 Nov 2014 03:46:00 +0000 (14:46 +1100)]
ctdb-scripts: Make 10.interface IPv6-safe

Add checking to "releaseip" and "updateip" to ensure that the given IP
address is really on the given interface with the given netmask.  If
reality doesn't match the given arguments then believe reality.

Use new function iptables_wrapper() instead of calling iptables()
directly.

Use new function flush_route_cache() instead of doing IPv4-specific
/proc magic.

Remove setting of otherwise unused variable "failed".

Fix a test for which the error message has changed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: New functions ip6tables() and iptables_wrapper()
Martin Schwenke [Fri, 21 Nov 2014 03:39:43 +0000 (14:39 +1100)]
ctdb-scripts: New functions ip6tables() and iptables_wrapper()

ip6tables() uses the same lock as iptables().  This is done on
suspicion.

iptables_wrapper() takes 1st argument "inet" or "inet6", and the rest
is passed to the correct iptables variant.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Add IPv6 addresses support in ip_maskbits_iface()
Martin Schwenke [Fri, 21 Nov 2014 03:37:54 +0000 (14:37 +1100)]
ctdb-scripts: Add IPv6 addresses support in ip_maskbits_iface()

It also prints a third word, the address family.  This is either
"inet" or "inet6".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-utils: Update Nagios code to use ctdb -X
Martin Schwenke [Thu, 20 Nov 2014 23:48:25 +0000 (10:48 +1100)]
ctdb-utils: Update Nagios code to use ctdb -X

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-doc: Update examples to use ctdb -X
Martin Schwenke [Thu, 20 Nov 2014 23:47:22 +0000 (10:47 +1100)]
ctdb-doc: Update examples to use ctdb -X

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tool: Fix "ctdb -Y ifaces" output to have trailing delimiters
Martin Schwenke [Thu, 20 Nov 2014 23:45:57 +0000 (10:45 +1100)]
ctdb-tool: Fix "ctdb -Y ifaces" output to have trailing delimiters

In the CTDB CLI tool source code and the documentation example.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Update integration tests to use ctdb -X
Martin Schwenke [Thu, 20 Nov 2014 04:03:25 +0000 (15:03 +1100)]
ctdb-tests: Update integration tests to use ctdb -X

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Update onnode and ctdb-diagnostics to use ctdb -X
Martin Schwenke [Thu, 20 Nov 2014 03:39:59 +0000 (14:39 +1100)]
ctdb-tools: Update onnode and ctdb-diagnostics to use ctdb -X

Also update onnode unit tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Update eventscripts to use ctdb -X instead of ctdb -Y
Martin Schwenke [Thu, 20 Nov 2014 03:32:46 +0000 (14:32 +1100)]
ctdb-scripts: Update eventscripts to use ctdb -X instead of ctdb -Y

Also update associated eventscript unit tests and ctdb stub.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Add -X option for machine parsable output with separator '|'
Martin Schwenke [Wed, 19 Nov 2014 07:19:50 +0000 (18:19 +1100)]
ctdb-tools: Add -X option for machine parsable output with separator '|'

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Add -x option to specify delimiter for machine readable output
Martin Schwenke [Wed, 19 Nov 2014 06:15:21 +0000 (17:15 +1100)]
ctdb-tools: Add -x option to specify delimiter for machine readable output

To support this, update printm() to replace ':' in format string with
options.machineseparator, which is a string but must contain a single
character.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tools: Produce machine readable output with new function printm()
Martin Schwenke [Wed, 19 Nov 2014 05:35:35 +0000 (16:35 +1100)]
ctdb-tools: Produce machine readable output with new function printm()

printm() is a printf(3) replacement and must be used to printing any
machine readable output.  It currently just calls vprintf(3).  Later
it will change the field delimiter.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoinotify: Properly handle cross-dir renames
Volker Lendecke [Fri, 5 Dec 2014 15:38:45 +0000 (15:38 +0000)]
inotify: Properly handle cross-dir renames

When watching two subdirectories with inotify and a file is moved between both,
we get a IN_MOVED_FROM for the source watch and a IN_MOVED_TO for the
destination watch. Without this patch we create a NOTIFY_ACTION_OLD_NAME for
the old directory. We hold this back in notify_fsp, expecting the NEW_NAME
immediately after it. In the cross-directory rename case this does not work,
we'll not get the NEW_NAME, there is no NEW_NAME in that directory.

This patch changes us to create NOTIFY_ACTION_REMOVED and NOTIFY_ACTION_ADDED
in this case. Not sure this is right, but at least it is better than before: We
get something at all.

This is more likely to happen with the notifyd approach, as there we
inotify-watch many subdirectories from one process. Without nootifyd you had to
have two explorer windows open and do a nfs or local mv between those two
directories to find this.

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 Dec  5 21:01:54 CET 2014 on sn-devel-104

5 years agolib: Fix signed/unsigned comparisons
Volker Lendecke [Wed, 3 Dec 2014 14:54:19 +0000 (15:54 +0100)]
lib: Fix signed/unsigned comparisons

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4: torture: leases. Simple lease_v2 rename test "v2_rename".
Jeremy Allison [Fri, 5 Dec 2014 05:29:47 +0000 (21:29 -0800)]
s4: torture: leases. Simple lease_v2 rename test "v2_rename".

Proves that renaming files can break handle leases.

With the previous patches we now pass this.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases: Make SMB2 setinfo SMB2_FILE_RENAME_INFORMATION_INTERNAL async.
Jeremy Allison [Fri, 5 Dec 2014 05:19:32 +0000 (21:19 -0800)]
s3: leases: Make SMB2 setinfo SMB2_FILE_RENAME_INFORMATION_INTERNAL async.

If there are any RH leases we must break them to read
and must wait for the client response before doing the rename.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases: send_break_message() public.
Jeremy Allison [Fri, 5 Dec 2014 05:15:24 +0000 (21:15 -0800)]
s3: leases: send_break_message() public.

We're going to need this to allow async SMB2
setinfo renames to send lease break messages
as well as the open code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases: Make aio_add_req_to_fsp() public.
Jeremy Allison [Fri, 5 Dec 2014 05:13:33 +0000 (21:13 -0800)]
s3: leases: Make aio_add_req_to_fsp() public.

We're going to need this to stop handle closures with
outstanding async SMB2 renames causing a crash.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases : Cope with renaming leased open files.
Jeremy Allison [Thu, 4 Dec 2014 18:14:23 +0000 (10:14 -0800)]
s3: leases : Cope with renaming leased open files.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases: Add leases_db_rename() to cope with renaming a leased file.
Jeremy Allison [Thu, 4 Dec 2014 18:13:47 +0000 (10:13 -0800)]
s3: leases: Add leases_db_rename() to cope with renaming a leased file.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoctdb-recoverd: Process all the records for vacuum fetch in a loop
Amitay Isaacs [Wed, 23 Apr 2014 08:02:39 +0000 (18:02 +1000)]
ctdb-recoverd: Process all the records for vacuum fetch in a loop

Processing one migration request at a time is very slow and processing
a batch of records can take longer than VacuumInterval.  This causes
subsequent vacuum fetch requests to be dropped.  The dropped records
can accumulate quickly and will cause the vacuum database traverse to
be quite expensive.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Dec  5 17:06:58 CET 2014 on sn-devel-104

5 years agoctdb-vacuum: Do not delete VACUUM MIGRATED records immediately
Amitay Isaacs [Mon, 14 Apr 2014 04:53:25 +0000 (14:53 +1000)]
ctdb-vacuum: Do not delete VACUUM MIGRATED records immediately

Such records should be processed by the local vacuuming daemon to ensure
that all the remote copies have been deleted first.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-vacuum: Use non-blocking lock when traversing delete tree
Amitay Isaacs [Wed, 5 Nov 2014 22:33:50 +0000 (09:33 +1100)]
ctdb-vacuum: Use non-blocking lock when traversing delete tree

This avoids vacuuming getting in the way of ctdb daemon to process
record requests.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-vacuum: Use non-blocking lock when traversing delete queue
Amitay Isaacs [Mon, 14 Apr 2014 03:18:41 +0000 (13:18 +1000)]
ctdb-vacuum: Use non-blocking lock when traversing delete queue

This avoids vacuuming getting in the way of ctdb daemon to process
record requests.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-vacuum: Stagger vacuuming child processes
Amitay Isaacs [Fri, 21 Feb 2014 03:58:00 +0000 (14:58 +1100)]
ctdb-vacuum: Stagger vacuuming child processes

This prevents multiple child processes being forked at the same time
for vacuuming TDBs.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-vacuum: Track time for vacuuming in database statistics
Amitay Isaacs [Tue, 11 Feb 2014 03:23:28 +0000 (14:23 +1100)]
ctdb-vacuum: Track time for vacuuming in database statistics

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agovfs_fruit: add AAPL options
Ralph Boehme [Fri, 28 Nov 2014 21:44:29 +0000 (22:44 +0100)]
vfs_fruit: add AAPL options

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec  5 00:34:01 CET 2014 on sn-devel-104

5 years agos4:torture:vfs_fruit: smb2/create context AAPL test
Ralph Boehme [Sat, 27 Sep 2014 15:21:12 +0000 (17:21 +0200)]
s4:torture:vfs_fruit: smb2/create context AAPL test

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/raw: make short_name available in buffer
Ralph Boehme [Wed, 1 Oct 2014 12:36:43 +0000 (14:36 +0200)]
s4:libcli/raw: make short_name available in buffer

This will be used in smb2/create AAPL context torture tests, where the
server returns an Mac OS X specific data blob in the short name
buffer. It's not a string, so the existing string extraction doesn't
cut it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: add SMB_VFS_READDIR_ATTR() to marshall direntry
Ralph Boehme [Wed, 26 Nov 2014 14:21:36 +0000 (15:21 +0100)]
s3:smbd: add SMB_VFS_READDIR_ATTR() to marshall direntry

SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata
for a directory entry when we're already marshalling the SMB reply buffer.

This would we used, when there's a need to repurpose some fields in the
the reply, like it's done with Apple's SMB2 extension "AAPL".

We then fetch AAPL metadata with the shiny new SMB_VFS_READDIR_ATTR()
VFS call and marshall appropiately.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_fruit: AAPL support
Ralph Boehme [Wed, 26 Nov 2014 17:11:17 +0000 (18:11 +0100)]
vfs_fruit: AAPL support

* readdir_attr VFS functions, used in trans2 when marshalling
  metadata associated with a directory entry

* support for reading and writing UNIX mode via MS NFS ACEs in NT ACL

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: ignore dacls with MS NFS ACEs
Ralph Boehme [Wed, 26 Nov 2014 17:01:37 +0000 (18:01 +0100)]
s3:smbd: ignore dacls with MS NFS ACEs

Ignore NFS ACEs in code the modifies
* default POSIX ACLs
* VFS: NFSv4 ACLs
* VFS: xattr and tdb ACLs

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/security: add a function that checks for MS NFS ACEs
Ralph Boehme [Tue, 14 Oct 2014 11:54:05 +0000 (13:54 +0200)]
libcli/security: add a function that checks for MS NFS ACEs

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/security: add NFS SID mappings
Ralph Boehme [Mon, 8 Sep 2014 21:18:35 +0000 (23:18 +0200)]
libcli/security: add NFS SID mappings

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: add SMB2 AAPL create context defines
Ralph Boehme [Fri, 22 Aug 2014 01:48:50 +0000 (03:48 +0200)]
s3:smbd: add SMB2 AAPL create context defines

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:vfs: add create tags to SMB_VFS_CREATEFILE
Ralph Boehme [Wed, 26 Nov 2014 13:12:51 +0000 (14:12 +0100)]
s3:vfs: add create tags to SMB_VFS_CREATEFILE

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: allocate out_context_blobs with talloc
Ralph Boehme [Fri, 28 Nov 2014 10:44:09 +0000 (11:44 +0100)]
s3:smbd: allocate out_context_blobs with talloc

By tallocing the out_context_blobs instead of using an automatic stack
variable, we can use out_context_blobs as talloc parent for individual
create tag that we add via smb2_create_blob_add().

This is in preperation of a SMB_VFS_CREATE_FILE modification where I add
the in and out_context_blobs as additional args. With this change in
place we can add create tags to out_context_blobs from there too.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:vfs: add SMB_VFS_READDIR_ATTR()
Ralph Boehme [Wed, 26 Nov 2014 13:30:37 +0000 (14:30 +0100)]
s3:vfs: add SMB_VFS_READDIR_ATTR()

SMB_VFS_READDIR_ATTR is a last minute hook to fetch additional metadata
for a directory entry when we're already marshalling the SMB reply
buffer.

This would be used, when there's a need to repurpose some fields in the
the reply, like it's done with Apple's SMB2 extension "AAPL".

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agounix_msg: Fix unix_msg_test_drain
Volker Lendecke [Thu, 4 Dec 2014 14:50:27 +0000 (14:50 +0000)]
unix_msg: Fix unix_msg_test_drain

poll_funcs_init_tevent does not register a tevent context by default. This
used to be the case in an early development stage, but apparently I
haven't tested this for a while :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Dec  4 18:55:08 CET 2014 on sn-devel-104

5 years agodocs-xml: document the interaction between "write cache size" and "aio read/write...
Stefan Metzmacher [Sat, 8 Nov 2014 08:47:01 +0000 (09:47 +0100)]
docs-xml: document the interaction between "write cache size" and "aio read/write size"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec  4 08:09:15 CET 2014 on sn-devel-104

5 years agos3:smbd: document the interaction between "smb2 leases" and "write cache size"
Stefan Metzmacher [Sat, 8 Nov 2014 08:45:59 +0000 (09:45 +0100)]
s3:smbd: document the interaction between "smb2 leases" and "write cache size"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest:Samba3: use "smb2 leases = yes"
Jeremy Allison [Tue, 14 Oct 2014 17:34:53 +0000 (10:34 -0700)]
selftest:Samba3: use "smb2 leases = yes"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_negprot: announce support for SMB2.1 leases.
Jeremy Allison [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smb2_negprot: announce support for SMB2.1 leases.

We only do this with "smb2 leases = yes"
and the default values for "oplocks = yes"
and "kernel oplocks = no".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:param: Add "smb2 leases" parameter. Default "false".
Jeremy Allison [Tue, 14 Oct 2014 17:34:53 +0000 (10:34 -0700)]
s3:param: Add "smb2 leases" parameter. Default "false".

This is currently marked as experimental!

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_create: support leases and pass them down to the VFS layer.
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smb2_create: support leases and pass them down to the VFS layer.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: Implementation of SMB2.1 and SMB3.0 leases.
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: Implementation of SMB2.1 and SMB3.0 leases.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: add lease related helper functions to oplock.c
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: add lease related helper functions to oplock.c

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: add lease key validation functions to open.c
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: add lease key validation functions to open.c

This makes sure a lease key can only be used for one specific
file.

This also handles the dynamic share file case [homes].

Pair-Programmed-With: Jeremy Allison <jra@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: add lease related helper functions to open.c
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: add lease related helper functions to open.c

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: add file_find_one_fsp_from_lease_key() helper function
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: add file_find_one_fsp_from_lease_key() helper function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_create: validate durable reconnects with leases
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smb2_create: validate durable reconnects with leases

We don't support leases yet, but prepares for the comming commits.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_create: allow durable handles with SMB2_LEASE_HANDLE
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smb2_create: allow durable handles with SMB2_LEASE_HANDLE

We don't support real lease yet, but this makes use of fsp_lease_type()
which converts a batch oplock into and RWH lease.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: add fsp_lease_type() and get_lease_type() helper functions
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: add fsp_lease_type() and get_lease_type() helper functions

These convert the oplock state into SMB2_LEASE_ flags.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:vfs.h: add more elements to struct fsp_lease
Stefan Metzmacher [Wed, 3 Dec 2014 16:57:37 +0000 (17:57 +0100)]
s3:vfs.h: add more elements to struct fsp_lease

We'll need a reference to the smbd_server_connection as well
as a timeout handler.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:locking: add downgrade_share_lease() helper function
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:locking: add downgrade_share_lease() helper function

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:locking: cleanup leases_db from share_mode_cleanup_disconnected()
Stefan Metzmacher [Thu, 27 Nov 2014 18:32:46 +0000 (19:32 +0100)]
s3:locking: cleanup leases_db from share_mode_cleanup_disconnected()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:locking: ensure all share mode removal functions go through a common lease refcoun...
Jeremy Allison [Fri, 10 Oct 2014 21:32:19 +0000 (14:32 -0700)]
s3:locking: ensure all share mode removal functions go through a common lease refcount manager.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.
Stefan Metzmacher [Thu, 27 Nov 2014 17:34:56 +0000 (18:34 +0100)]
s3:open_files.idl: add data structures for SMB2.1 and SMB3.0 leases.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:locking: add leases_db infrastructure
Volker Lendecke [Fri, 10 Oct 2014 23:36:54 +0000 (16:36 -0700)]
s3:locking: add leases_db infrastructure

Will enable us to solve the dynamic share path problem
with leases on [homes].

We're also able to give the correct error codes when a
lease key is re-used with a different file name.

Pair-Programmed-With: Jeremy Allison <jra@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: leases: libsmbsharemodes no longer works with SMB2 leases inside our locking...
Jeremy Allison [Thu, 4 Dec 2014 01:06:08 +0000 (17:06 -0800)]
s3: leases: libsmbsharemodes no longer works with SMB2 leases inside our locking.tdb.

Remove it until a maintainer can be found.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_server: add smbd_smb2_send_lease_break() helper function
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smb2_server: add smbd_smb2_send_lease_break() helper function

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smb2_server: allow smbd_smb2_send_break() with session == NULL and tcon == NULL
Stefan Metzmacher [Thu, 13 Nov 2014 10:50:14 +0000 (11:50 +0100)]
s3:smb2_server: allow smbd_smb2_send_break() with session == NULL and tcon == NULL

In future we want to use this for lease breaks and they're not attached
to a session.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: Add fsp_client_guid() utility function to return the connected client guid.
Jeremy Allison [Wed, 5 Nov 2014 05:46:14 +0000 (21:46 -0800)]
s3:smbd: Add fsp_client_guid() utility function to return the connected client guid.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: factor out a send_break_to_none() helper function
Volker Lendecke [Tue, 28 Oct 2014 22:31:46 +0000 (15:31 -0700)]
s3:smbd: factor out a send_break_to_none() helper function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:torture:smb2: let smb2.lease.[v2_]complex1 check the R->NONE breaks
Stefan Metzmacher [Wed, 3 Dec 2014 21:32:33 +0000 (22:32 +0100)]
s4:torture:smb2: let smb2.lease.[v2_]complex1 check the R->NONE breaks

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture:smb2: Add smb2.lease.v2_breaking3 test.
Jeremy Allison [Tue, 2 Dec 2014 20:58:28 +0000 (12:58 -0800)]
s4:torture:smb2: Add smb2.lease.v2_breaking3 test.

This verifies the epoch handling in the multi step break.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:torture:smb2: Add test that shows the client can respond to a lease break over...
Jeremy Allison [Mon, 1 Dec 2014 21:57:57 +0000 (13:57 -0800)]
s4:torture:smb2: Add test that shows the client can respond to a lease break over a different connection.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopam_winbind: fix warn_pwd_expire implementation.
Günther Deschner [Wed, 3 Dec 2014 15:55:39 +0000 (16:55 +0100)]
pam_winbind: fix warn_pwd_expire implementation.

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

warn_pwd_expire parameter is not working as documented in pam_winbind manual
page. This patch adds missing bit and allows disabling warning message fully,
i.e. setting warn time to zero days.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec  3 21:36:49 CET 2014 on sn-devel-104

5 years agos3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()
Stefan Metzmacher [Sat, 29 Nov 2014 09:52:05 +0000 (10:52 +0100)]
s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()

Change-Id: I40bcfacb812b0dac7917533c9baf82a79f598efd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Dec  3 06:44:29 CET 2014 on sn-devel-104

5 years agopdb: Increase version number to fix ABI
Garming Sam [Tue, 25 Nov 2014 01:56:45 +0000 (14:56 +1300)]
pdb: Increase version number to fix ABI

In the process, we can also rename pdb to avoid conflicts with libpdb.

We don't depend directly on pdb to avoid duplicate symbols.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10355
Change-Id: I4df6ba2f4ce35d3718dc4198b527cca46a139efe
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoidmap: return the correct id type to *id_to_sid methods
Garming Sam [Wed, 26 Nov 2014 02:33:35 +0000 (15:33 +1300)]
idmap: return the correct id type to *id_to_sid methods

We have a pointer to a unixid which is sent down instead of a uid or
gid. We can use this as an in-out variable so that pdb_samba_dsdb can be
returned ID_TYPE_BOTH to cache correctly instead of leaving it as
ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoidmap: unify passdb *id_to_sid methods
Garming Sam [Tue, 25 Nov 2014 01:45:26 +0000 (14:45 +1300)]
idmap: unify passdb *id_to_sid methods

Instead of passing down gid or uid, a pointer to a unixid is now sent
down. This acts as an in-out variable so that the idmap functions can
correctly receive ID_TYPE_BOTH, filling in cache details correctly
rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066
Pair-programmed-with: Andrew Bartlett <abarlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:utils/profiles fix a use after free
Christian Ambach [Tue, 4 Nov 2014 22:51:23 +0000 (23:51 +0100)]
s3:utils/profiles fix a use after free

path is a talloc-child of subkeys, so subkeys should not be freed before calling
verbose_output

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Dec  3 00:43:19 CET 2014 on sn-devel-104

5 years agos3:registry/regfio fix some valgrind warnings
Christian Ambach [Tue, 4 Nov 2014 22:50:07 +0000 (23:50 +0100)]
s3:registry/regfio fix some valgrind warnings

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:registry/regfio read SD from the correct location
Christian Ambach [Tue, 4 Nov 2014 22:47:26 +0000 (23:47 +0100)]
s3:registry/regfio read SD from the correct location

try to find the security descriptor at the data pointer, not at the beginning of the hbin

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

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>