Jeremy Allison [Thu, 18 Aug 2016 21:04:05 +0000 (14:04 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setatr_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 21:02:24 +0000 (14:02 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:59:52 +0000 (13:59 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:40:23 +0000 (13:40 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_nttrans_create_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:37:22 +0000 (13:37 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:34:44 +0000 (13:34 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rmdir_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:33:30 +0000 (13:33 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:32:03 +0000 (13:32 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_unlink_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:29:01 +0000 (13:29 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntrename_internal_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:26:59 +0000 (13:26 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rename_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:17:49 +0000 (13:17 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_qpathinfo_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:12:22 +0000 (13:12 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setpathinfo_send().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:06:54 +0000 (13:06 -0700)]
s3: libsmb: Add clistr_is_previous_version_path()
Looks for @GMT- token in pathname.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 20:45:35 +0000 (13:45 -0700)]
s3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create().
Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 19:45:32 +0000 (12:45 -0700)]
s3: libsmb: Add uint16_t addtional_flags2 to cli_trans_send().
Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Thu, 18 Aug 2016 19:20:25 +0000 (12:20 -0700)]
s3: libsmb: Add uint16_t additional_flags2 arg to cli_smb_send().
Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Wed, 17 Aug 2016 21:33:00 +0000 (14:33 -0700)]
s3: SMB1: Add missing FLAGS2 definitions from MS-SMB.
https://bugzilla.samba.org/show_bug.cgi?id=12165
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Douglas Bagnall [Wed, 11 May 2016 23:38:09 +0000 (11:38 +1200)]
netcmd/domain: improve error message grammar
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Aug 19 17:30:39 CEST 2016 on sn-devel-144
Douglas Bagnall [Wed, 3 Aug 2016 04:04:30 +0000 (16:04 +1200)]
vlv tests: remove uninteresting debug message
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Douglas Bagnall [Mon, 15 Aug 2016 23:48:02 +0000 (11:48 +1200)]
Remove hopelessly out of date Roadmap
Nobody has noticed, so it shouldn't be missed.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Christof Schmitt [Thu, 18 Aug 2016 21:01:50 +0000 (14:01 -0700)]
winbindd: Introduce helper function for winbindd_cache.tdb directory
Also add a comment why the file is placed in the state directory.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug 19 13:30:23 CEST 2016 on sn-devel-144
Christof Schmitt [Thu, 18 Aug 2016 20:46:52 +0000 (13:46 -0700)]
docs: Clarify description for cache, lock and state directory settings
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
ouyang.xu [Mon, 11 Jul 2016 10:12:52 +0000 (18:12 +0800)]
pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID
Signed-off-by: kkhaike <kkhaike@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Fri Aug 19 09:35:15 CEST 2016 on sn-devel-144
Amitay Isaacs [Thu, 18 Aug 2016 15:26:38 +0000 (01:26 +1000)]
s3-libnet: Add missing format element
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12163
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Aug 18 23:49:42 CEST 2016 on sn-devel-144
Amitay Isaacs [Sun, 7 Aug 2016 08:17:19 +0000 (18:17 +1000)]
s3-lib: Pass missing argument for format string
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12163
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Uri Simchoni [Thu, 4 Aug 2016 11:59:23 +0000 (14:59 +0300)]
smbd: allow reading files based on FILE_EXECUTE access right
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Aug 18 18:58:22 CEST 2016 on sn-devel-144
Martin Schwenke [Thu, 18 Aug 2016 02:57:33 +0000 (12:57 +1000)]
ctdb-ipalloc: Fix cumulative takeover timeout
Commit
c40fc62642ff5ac49b75e9af49c299e33dbc9073 runs the IP allocation
algorithm after calculating the timeout offset. If the algorithm
takes a long time then there may be no attempt to release or take over
IPs.
Instead, reset the timeout just before the RELEASE_IP stage if an
early jump to IPREALLOCATED was not taken.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12161
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 18 12:36:37 CEST 2016 on sn-devel-144
Jeremy Allison [Wed, 17 Aug 2016 17:57:10 +0000 (10:57 -0700)]
s3: vfs: snapper: Fix snapper_gmt_strip_snapshot() function to strip @GMT token identically to shadow_copy2.c:shadow_copy2_strip_snapshot()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Aug 18 06:43:02 CEST 2016 on sn-devel-144
Jeremy Allison [Wed, 17 Aug 2016 17:53:08 +0000 (10:53 -0700)]
s3: vfs: snapper: Add and use len_before_gmt, calculated as (p-name).
Make the code closer to the same functionality in shadow_copy2.c:shadow_copy2_strip_snapshot().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Jeremy Allison [Wed, 17 Aug 2016 17:49:50 +0000 (10:49 -0700)]
s3: vfs: shadow_copy2: Replace all uses of (p-name) with len_before_gmt.
p and name don't change, and we've already calculated this length.
Part of the effort to make the code inside vfs_snapper.c that does
the same thing more similar (we can't make these functions identical
due to the 'snapdir' use case).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Martin Schwenke [Mon, 1 Aug 2016 06:00:55 +0000 (16:00 +1000)]
ctdb-tests: Validate that TAKE_IP works with IP already on an interface
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): Thu Aug 18 02:50:16 CEST 2016 on sn-devel-144
Martin Schwenke [Tue, 2 Aug 2016 11:02:08 +0000 (21:02 +1000)]
ctdb-tests: Validate that unexpected IP on interface is properly released
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 02:18:15 +0000 (12:18 +1000)]
ctdb-recoverd: Don't directly release rogue IP addresses
This is inconsistent with the rest of the local IP verification. It
should notice problems but not try to fix them directly. Like other
cases, it should use an IP takeover run to try to fix the problem. In
this case the address might have just been added and an out-of-band
RELEASE_IP might cause conflicts (i.e. "another change is in flight")
with a scheduled IP takeover run.
This effectively reverts commit
694c1b269edc95df446b2e171919be0c266383c4. Not sure why this was
needed after
c7e648c2d11f9785f2493a3dd67567a635633489. More recently
commit
6471541d6d2bc9f2af0ff92b280abbd1d933cf88 moves responsibility
for determining interface/netmask to 10.interface so this should
continue to work just fine.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 3 Aug 2016 01:05:06 +0000 (11:05 +1000)]
ctdb-daemon: Fix takeover of incorrectly assigned public IP address
Cause an "updateip" instead of just logging a message.
This may reset existing connections. However, CTDB doesn't think the
address should already be hosted on the node so there should be no
connections.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 29 Jul 2016 09:48:37 +0000 (19:48 +1000)]
ctdb-daemon: Avoid referencing NULL pointer due to unknown old interface
This doesn't currently happen but it will in a subsequent commit.
That commit and this one could be squashed but then the functional
change gets lost in amongst this one.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 29 Jul 2016 09:41:01 +0000 (19:41 +1000)]
Revert "When adding an ip at runtime, it might not yet have an iface assigned to it, so ensure that the next takover_ip call will fall through to accept the ip and add it."
This reverts commit
4136f2714578a9bc0e5632a21d287a50f9ec137a.
If the IP address is on an interface then it won't help to pretend
that it isn't. This will simply cause a takeip event, which will fail
because the address can't be added. Note that the IP address isn't
necessarily new - something unexpected may have happened.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 29 Jul 2016 09:29:23 +0000 (19:29 +1000)]
ctdb-scripts: Add early exit for redundant updateip
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 17 Aug 2016 04:43:05 +0000 (14:43 +1000)]
ctdb-daemon: Drop special case handling for new IP already on interface
The address may already be assigned to another node, so this is wrong.
It also leaves the interface unknown.
This is better left to code that handles rogue IP addresses. A
takeover run should correctly takeover the address if it is assigned
to this node or release it if it is assigned to another node. Coming
soon...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 11 Aug 2016 04:07:44 +0000 (14:07 +1000)]
ctdb-daemon: Use release_ip_post() when releasing all IP addresses
This has the advantage of using common code. Also, if there was
previously a failed attempt to release the IP address as part of a
delete, then this will finish processing the delete.
Extra care needs to be taken when a VNN is actually deleted.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 11 Aug 2016 03:57:43 +0000 (13:57 +1000)]
ctdb-daemon: Factor out new function release_ip_post()
This contains the cleanup that needs to be done after an IP address is
released from an interface.
state->vnn is set to the return value from release_ip_post(), which is
either the original VNN, or NULL if it was deleted. This allows
correct handling of the in-flight flag in the destructor for state.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 11 Aug 2016 03:41:12 +0000 (13:41 +1000)]
ctdb-daemon: Do not copy address for RELEASE_IP message
If there's an allocation failure then the implicit early return in
CTDB_NO_MEMORY_VOID() means that no reply is sent to the control.
ctdb_daemon_send_message() makes a copy of the data, so don't copy it
here and remove an unnecessary chance of failure.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sat, 30 Jul 2016 01:12:19 +0000 (11:12 +1000)]
ctdb-daemon: Do not update the VNN state on RELEASE_IP failure
If RELEASE_IP fails then updating the VNN makes it inconsistent with
reality. Instead, log the failure and move on to the next IP
address.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sun, 7 Aug 2016 21:09:38 +0000 (07:09 +1000)]
ctdb-daemon: Try to release IP address even if interface is unknown
The "releaseip" event in 10.interface will determine the interface and
do the right thing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12158
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 15 Aug 2016 05:22:54 +0000 (15:22 +1000)]
ctdb-common: Save errno before closing file to keep debug accurate
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
In the AIX case, also add the close of the file.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sat, 13 Aug 2016 00:29:24 +0000 (10:29 +1000)]
ctdb-tools: Consistently use db_name
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
CID
1364703: Resource leak (RESOURCE_LEAK)
However, this would already be fixed by the fix for CID
1125618, so
this is probably just a minor bug fix.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sat, 13 Aug 2016 00:29:15 +0000 (10:29 +1000)]
ctdb-tools: Fix CID
1125618 String not null terminated (STRING_NULL)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:45:35 +0000 (17:45 +1000)]
ctdb-logging: Fix CID
1272823 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:35:22 +0000 (17:35 +1000)]
ctdb-daemon: Fix CID
1362723 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:31:52 +0000 (17:31 +1000)]
ctdb-tcp: Fix CID
1362724 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 15 Aug 2016 04:50:09 +0000 (14:50 +1000)]
ctdb-client: Print error message before next syscall to avoid losing errno
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:18:55 +0000 (17:18 +1000)]
ctdb-client: Fix CID
1362725 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:16:34 +0000 (17:16 +1000)]
ctdb-daemon: Fix CID
1362726 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sun, 14 Aug 2016 23:43:46 +0000 (09:43 +1000)]
ctdb-tcp: Set file descriptor to -1 after close.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:12:21 +0000 (17:12 +1000)]
ctdb-tcp: Fix CID
1362727 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:04:45 +0000 (17:04 +1000)]
ctdb-common: Fix CID
1362728 Unchecked return value from library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 11 Aug 2016 01:15:58 +0000 (11:15 +1000)]
ctdb-common: Fix CID
1362729 Unchecked return value from library
Drop setting socket non-blocking and close-on-exec. The socket is
closed soon after. Only a single packet is sent, making it almost
impossible for it to block. Also, note that sockets aren't setup this
way for IPv6.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 07:02:22 +0000 (17:02 +1000)]
ctdb-tests: Update porting test to be more flexible about line numbers
This way the test doesn't need to be changed every time the code is
moved around.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 06:53:54 +0000 (16:53 +1000)]
ctdb-daemon: Fix CID
1125574 Operands don't affect result
Interfaces going up or down are always interesting, so log these at
error level.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 06:46:51 +0000 (16:46 +1000)]
ctdb-daemon: Fix CID
1125575 Operands don't affect result
This is related to an error, so repeatedly log at error level instead
of trying to avoid repetition.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 10 Aug 2016 06:42:13 +0000 (16:42 +1000)]
ctdb-daemon: Fix CID
1272855 Operands don't affect result
Failures are already logged at alert/error level above, so just log
the summary at notice level.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Amitay Isaacs [Mon, 15 Aug 2016 05:58:58 +0000 (15:58 +1000)]
ctdb-tools: Drop "ctdb rebalancenode"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
This was already dropped in commit
d67868469521341aa92c589a0bb6df90b150d555.
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 17 09:22:13 CEST 2016 on sn-devel-144
Amitay Isaacs [Mon, 15 Aug 2016 05:58:19 +0000 (15:58 +1000)]
ctdb-tools: Drop "ctdb rebalanceip"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12151
This was already dropped in commit
aaa57fbcb392061f8fbb5a12fd0e6a7be934ab66.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Mon, 15 Aug 2016 05:54:51 +0000 (15:54 +1000)]
ctdb-tools: Addition of IPs is deferred until the next takeover run
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12152
This makes the behaviour of "ctdb addip" similar to "ctdb delip".
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Jeremy Allison [Tue, 16 Aug 2016 16:43:37 +0000 (09:43 -0700)]
s3: vfs: shadow_copy2. Remove any trailing slash when stripping @GMT-YYYY... from the end of a path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 17 05:25:30 CEST 2016 on sn-devel-144
Jeremy Allison [Tue, 16 Aug 2016 16:41:43 +0000 (09:41 -0700)]
s3: vfs: shadow_copy2: Re-use an existing variable already set to the right value (p - name).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Michael Adam [Tue, 9 Aug 2016 16:25:12 +0000 (18:25 +0200)]
idmap: centrally check that unix IDs returned by the idmap backends are in range
Note: in the long run, it might be good to move this kind of
exit check (before handing the result back to the client)
to the parent winbindd code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12155
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug 17 01:21:39 CEST 2016 on sn-devel-144
Michael Adam [Mon, 15 Aug 2016 21:07:33 +0000 (23:07 +0200)]
idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()
If the range allows it, then id==0 should not be forbidden.
This seems to have been taken in from idmap_ldap when the
function was originally created.
See
634cd2e0451d4388c3e3f78239495cf595368b15 .
The other backends don't seem to have had that
extra check for id == 0.
The reasoning for this change is that the range check should
apply to all cases. If the range includes the 0, then it
should be possible to get it as result. In particular,
this way, the function becomes applicable also to the
passdb backend case, e.g. in a samba4-ad-dc setup where
the Admin gets uid == 0.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12155
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 12 Aug 2016 10:15:46 +0000 (12:15 +0200)]
s3:lib/pthreadpool: fix the build on older systems
Some systems required an explicit <signal.h>, which comes
via "system/wait.h"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 16 19:09:55 CEST 2016 on sn-devel-144
Uri Simchoni [Fri, 12 Aug 2016 21:19:33 +0000 (00:19 +0300)]
smbd: look only at handle readability for COPYCHUNK dest
This commits sets the stage for a change of behavior
in a later commit.
When checking FILE_READ_DATA on the COPYCHUNK dest handle,
only check the handle readability and not the extra right
that may have been added due to the FILE_EXECUTE right.
The check for FILE_READ_DATA always seemed strange for the
dest handle, which is not read. It turns out that in Windows,
this check is not done at the SMB layer, but at a lower layer
that processes the IOCTL request - the IOCTL code has bits
that specify what type of access check needs to be done.
Therefore, this lower layer is unaware of the SMB layer's
practice of granting READ access based on the FILE_EXECUTE
right, and it only checks the handle's readability.
This subtle difference has observable behavior - the
COPYCHUNK source handle can have FILE_EXECUTE right instead
of FILE_READ_DATA, but the dest handle cannot.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Aug 16 15:21:03 CEST 2016 on sn-devel-144
Uri Simchoni [Thu, 4 Aug 2016 10:12:58 +0000 (13:12 +0300)]
s4-smbtorture: pin copychunk exec right behavior
Add tests that show copychunk behavior when the
source and dest handles have execute right instead
of read-data right.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Uri Simchoni [Mon, 15 Aug 2016 20:39:50 +0000 (23:39 +0300)]
seltest: allow opening files with arbitrary rights in smb2.ioctl tests
Separate file creation (which requires write access) from the
opening of the file for the test (which might be without write
access).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Uri Simchoni [Sat, 13 Aug 2016 18:23:34 +0000 (21:23 +0300)]
seltest: implicit FILE_READ_DATA non-reporting
This test (passes against Windows Server 2012R2) shows
that the implicit FILE_READ_DATA that is added whenever
FILE_EXECUTE is granted, is not reported back when querying
the handle.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Uri Simchoni [Sun, 31 Jul 2016 11:29:37 +0000 (14:29 +0300)]
s4-selftest: add test for read access check
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Uri Simchoni [Sun, 31 Jul 2016 11:26:24 +0000 (14:26 +0300)]
s4-selftest: add functions which create with desired access
Add functions which create a file or a directory with
specific desired access.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Uri Simchoni [Thu, 4 Aug 2016 09:59:38 +0000 (12:59 +0300)]
s4-smbtorture: use standard macros in smb2.read test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Christof Schmitt [Fri, 12 Aug 2016 21:59:07 +0000 (14:59 -0700)]
smbd: Fix snapshot query on shares with DFS enabled
When DFS is enabled (host msdfs = yes and msdfs root = yes), then SMB
clients send create requests in the format \hostname\service\path.
Putting the GMT tag as first element breaks the DFS parsing and results
in OBJECT_NOT_FOUND for snapshotted files. Fix this by appending the
GMT tag to the end of the path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12150
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 13 05:44:39 CEST 2016 on sn-devel-144
Uri Simchoni [Thu, 11 Aug 2016 20:54:22 +0000 (23:54 +0300)]
selftest: add tests for dfree with inherit owner enabled
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Wed, 20 Jan 2016 19:54:24 +0000 (21:54 +0200)]
selftest: refactor test_dfree_quota.sh - add share parameter
Add a share parameter to individual disk-free tests. This will
allow running tests on shares other than dfq share.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Thu, 11 Aug 2016 20:37:42 +0000 (23:37 +0300)]
smbd: use owner uid for free disk calculation if owner is inherited
If "inherit owner" is enabled, then new files created under a
directory shall consume the quota of the directory's owner, so
the free disk calculation should take that quota into account,
not the quota of the user creating the file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Wed, 13 Jan 2016 22:09:36 +0000 (00:09 +0200)]
smbd: get a valid file stat to disk_quotas
Most calls to disk_quotas originate at a state with an
open file descriptor. Pass the file's stat info down to
disk_quota, so that we can avoid extra stat's and the related
error handling.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12145
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Wed, 27 Jan 2016 06:12:20 +0000 (08:12 +0200)]
quotas: small cleanup
Remove an internal function from proto.h
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Fri, 12 Aug 2016 11:18:19 +0000 (13:18 +0200)]
ctdb: Fix the O3 developer build on RHEL7
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): Sat Aug 13 00:55:02 CEST 2016 on sn-devel-144
Volker Lendecke [Tue, 9 Aug 2016 09:38:43 +0000 (11:38 +0200)]
vfs_gpfs: Load nfs4 acl params at tcon time
This reduces user-space CPU for metadata intensive workloads, lp_parm_* is
expensive doing lots of strwicmp.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Aug 12 21:03:36 CEST 2016 on sn-devel-144
Volker Lendecke [Tue, 9 Aug 2016 09:31:12 +0000 (11:31 +0200)]
nfs4acls: Allow nfs4 acl params to be set by callers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:28:30 +0000 (11:28 +0200)]
nfs4acls: Make smbacl4_vfs_params public
vfs_gpfs & others will be able to embed this structure in their special config.
We could have gone with an anonymous struct and a talloc'ed object, but for my
taste this is specialized and hidden enough that it's not worth the
indirection.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_set_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params in
advance
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_get_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params in
advance
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_fget_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params
in advance. nfs4 acl parameters should not change while a tcon is live,
and lp_parm_get_* show up in profiles. Loading the parameters once at
tcon time will remove this.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 07:10:19 +0000 (09:10 +0200)]
nfs4acls: Add some const
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 07:07:13 +0000 (09:07 +0200)]
nfs4acls: Remove a typedef
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Douglas Bagnall [Thu, 11 Aug 2016 23:50:07 +0000 (11:50 +1200)]
KCC: Fix misnamed variable in DSA object
Found by Garming. Unlikely to affect anyone.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12143
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Aug 12 08:20:31 CEST 2016 on sn-devel-144
Volker Lendecke [Sun, 31 Jul 2016 05:42:21 +0000 (07:42 +0200)]
lib: Use replace.h properly in pthreadpool
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 12 04:26:09 CEST 2016 on sn-devel-144
Amitay Isaacs [Tue, 2 Aug 2016 09:06:10 +0000 (19:06 +1000)]
ctdb-pmda: Use 1s timeout for fetching statistics
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12138
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 11 Aug 2016 13:46:49 +0000 (15:46 +0200)]
ldb: Fix some signed/unsigned hickups
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 11 23:49:38 CEST 2016 on sn-devel-144
Jeremy Allison [Wed, 10 Aug 2016 21:42:07 +0000 (14:42 -0700)]
s3: oplock: Fix race condition when closing an oplocked file.
We must send the 'oplock released' message whilst the lock
is held in the close path. Otherwise the messaged smbd can
race with the share mode delete.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 10 Aug 2016 21:39:52 +0000 (14:39 -0700)]
smbd: oplock: Factor out internals of remove_oplock() into new remove_oplock_under_lock().
Allows this to be called elsewhere.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 10 Aug 2016 21:35:42 +0000 (14:35 -0700)]
smbd: oplock: Fixup debug messages inside remove_oplock().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 10 Aug 2016 10:44:26 +0000 (12:44 +0200)]
script/autobuild.py: include the branch name in the output
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Aug 11 08:38:47 CEST 2016 on sn-devel-144
Stefan Metzmacher [Sat, 6 Aug 2016 08:33:49 +0000 (10:33 +0200)]
selftest/flapping: add some samba3.blackbox.smbclient_s3 tests
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108
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 Aug 11 04:42:30 CEST 2016 on sn-devel-144
Stefan Metzmacher [Fri, 5 Aug 2016 20:06:41 +0000 (22:06 +0200)]
Revert "s4: tests: Skip drs tests."
This reverts commit
08d03f79de49826dc5dff3bc09193f1404e5f549.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>