1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

104444 Commits

Author SHA1 Message Date
Jeremy Allison
4276ffbab4 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>
(cherry picked from commit 461000c8812a99a81a9f3fc87f93c1b7c67f42bd)
2016-08-28 18:12:10 +02:00
Jeremy Allison
ce5acbf390 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>
(cherry picked from commit 47c1314429cdf516358d5e00ca24c313ddab67b0)
2016-08-28 18:12:10 +02:00
Jeremy Allison
c98a801e8f 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>
(cherry picked from commit d7ee917b165da2695433b7b115363223f2bd214f)
2016-08-28 18:12:10 +02:00
Jeremy Allison
e702d6af8c 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>
(cherry picked from commit cd4a60bb1f84891763617f96de148068e0492773)
2016-08-28 18:12:10 +02:00
Jeremy Allison
30c97b3084 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>
(cherry picked from commit 17d1f19eda2c735fcb10a389c3681ccd385bb9c7)
2016-08-28 18:12:10 +02:00
Jeremy Allison
028f181035 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>
(cherry picked from commit 3081604734a9531cefa71d0417a6fbfee9a6a8b6)
2016-08-28 18:12:10 +02:00
Jeremy Allison
a271db6064 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>
(cherry picked from commit 3242a0b9f0ae0d51110dc6542195af1be91aeece)
2016-08-28 18:12:10 +02:00
Jeremy Allison
663c35ddbe 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>
(cherry picked from commit c2a1905abd5d8756dd4afdd3116d311b1dec1246)
2016-08-28 18:12:10 +02:00
Jeremy Allison
fe2f658e4e 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>
(cherry picked from commit ae7047923e756d7ee1d760b7495560c25c71b523)
2016-08-28 18:12:10 +02:00
Jeremy Allison
87a1a1acb6 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>
(cherry picked from commit 21a7bf428bb8ed5b5634b87896bf0aa6c095d7f6)
2016-08-28 18:12:10 +02:00
Jeremy Allison
f570cda95a 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>
(cherry picked from commit 75e4290b6055cf95fc4730c4fa431bcc91eed203)
2016-08-28 18:12:10 +02:00
Jeremy Allison
6f1ae6a3dc 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>
(cherry picked from commit 19696f3494bd944ac9226aeebebb7a00df6f53b4)
2016-08-28 18:12:10 +02:00
Jeremy Allison
c74aa87523 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>
(cherry picked from commit 79c8b756715d021f12474a12eca1efb596f92a84)
2016-08-28 18:12:10 +02:00
Jeremy Allison
050673dc89 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>
(cherry picked from commit 76bbc4c0c338a021e10f3d2de2f6c58b4ee81169)
2016-08-28 18:12:10 +02:00
Jeremy Allison
ac64b26f83 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>
(cherry picked from commit a876f915fd2cddc96e6044c0a73c87153445baf6)
2016-08-28 18:12:10 +02:00
Jeremy Allison
cccf74e608 s3: SMB1: Add missing FLAGS2 definitions from MS-SMB.
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>
(cherry picked from commit 66650e67698ed2ed2c1e604343d4209e84f58032)
2016-08-28 18:12:10 +02:00
Jeremy Allison
598327abcf 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

(cherry picked from commit b21308252eb409bad6089cc0f09fada0229d33e8)
2016-08-28 18:12:09 +02:00
Jeremy Allison
b4a05b1f88 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>
(cherry picked from commit 3e3b9be948d873696a1ab9c0cb859bd8911165f0)
2016-08-28 18:12:09 +02:00
Jeremy Allison
e5baf884ef 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>
(cherry picked from commit abf18f42dc398f5f17088de87fd0e681fd44ebeb)
2016-08-28 18:12:09 +02:00
Jeremy Allison
4b266772a3 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

(cherry picked from commit 639063da8c5077170bfe2dc4d3a69c3219a4f6a1)
2016-08-28 18:12:09 +02:00
Jeremy Allison
1901c9e7da 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>
(cherry picked from commit 6245f2c042da55c71086e1d40186b11964ddeba8)
2016-08-28 18:12:09 +02:00
Christof Schmitt
ad835cff55 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

(cherry picked from commit f1b42ec778e08875e076df7fdf67dd69bf9b2757)
2016-08-28 18:12:09 +02:00
Douglas Bagnall
74fa37acf0 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

(cherry picked from commit e7ad8727be6d947f31ca2ca9bfee81b2a34f25a5)
2016-08-28 18:12:09 +02:00
Martin Schwenke
eb55718e1b ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper
The current daemons_stop() implementation uses very loose matching to
decide which processes to kill if "ctdb shutdown" hasn't worked within
1 second.  This can cause ctdbd processes from other test runs to be
killed.

Instead, use ctdbd_wrapper, which uses the PID file as a last resort.
This has the advantage of never killing ctdbd processes from other
test runs.  However, this also has the obvious consequence that an
interrupted test run in one directory can not have its daemons cleaned
up from a new test run in a different directory.

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

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): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144

(cherry picked from commit 17dfd8b96bc1750a2f435caa1d208766257346f3)

Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Wed Aug 24 15:35:51 CEST 2016 on sn-devel-144
2016-08-24 15:35:51 +02:00
Martin Schwenke
c0dba4948c ctdb-tests: Remove function daemons_start_1()
This function doesn't do anything significant, so just unroll the body
into the loop in daemons_start().

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit bcb33c46dfe3d6c06eb6b3b5e7f8625538772d5e)
2016-08-24 11:42:31 +02:00
Martin Schwenke
207085031f ctdb-tests: Move local daemon configuration creation into setup_ctdb()
These files don't need to be re-generated on every restart.  They can
be generated once when CTDB is first started.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 3c87868d208de8928e25db1dd34266830f017a07)
2016-08-24 11:42:31 +02:00
Martin Schwenke
e281108840 ctdb-tests: Drop attempts to pass arguments to ctdbd on (re)start
This is not used.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit eb38d02eb77dd654c8ed79fe985f738431918c9f)
2016-08-24 11:42:31 +02:00
Martin Schwenke
f4618fca56 ctdb-tests: Drop function _ctdb_hack_options()
It does something special if the --start-as-stopped option is given
and is not used in any tests.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit fd443b8cce4dedfe9a72f25e955274f66da41290)
2016-08-24 11:42:31 +02:00
Martin Schwenke
18334fd214 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

(cherry picked from commit 626dcc9e493e2ac4fd502f75c7cb4d29f686f017)
2016-08-24 11:42:31 +02:00
Martin Schwenke
46890c52e6 ctdb-daemon: When releasing an IP, update PNN in callback
When an error occurs so an IP address is not released then the PNN in
the VNN is currently incorrectly updated.

Instead, update the PNN in the callback when the release is
successful.  Also, explicitly update the PNN on redundant releases.

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>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sun Aug 21 22:45:33 CEST 2016 on sn-devel-144

(cherry picked from commit 6dc75c7d24325d2070eb7feab5399dbfda50da96)
2016-08-24 11:42:31 +02:00
Martin Schwenke
2a9566f27f ctdb-daemon: Rename takeover_callback_state -> release_ip_callback_state
Many years ago takeover_callback_state was used for both IP takeover
and release.  Now it is only used when releasing an IP so rename it to
improve clarity.

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>
(cherry picked from commit 976a50af6f045765c7bf1961e26efc3cba17f3ba)
2016-08-24 11:42:31 +02:00
Martin Schwenke
65445d5503 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>
(cherry picked from commit d2a91394f55a2e0152bf470dac2608618db13b1f)
2016-08-24 11:42:30 +02:00
Martin Schwenke
5fa6a1dfb0 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>
(cherry picked from commit 46c5136e4e4bd291cbb96395374c9b133f5d8ad8)
2016-08-24 11:42:30 +02:00
Martin Schwenke
c80c2cf16e 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>
(cherry picked from commit e653c8bb4a7bd712351a4ead3997c61b22c46f8d)
2016-08-24 11:42:30 +02:00
Martin Schwenke
5e4db43c54 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>
(cherry picked from commit ca22373231918dab4e94cf1bab03253aadd61993)
2016-08-24 11:42:30 +02:00
Martin Schwenke
a275b0c3dc 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>
(cherry picked from commit 509491a868ed01bfc5a970bd36eea4b01130853a)
2016-08-24 11:42:30 +02:00
Martin Schwenke
bddfe9b496 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>
(cherry picked from commit 225575e7e7d154ac24fef71e503e0cccd69f7463)
2016-08-24 11:42:30 +02:00
Martin Schwenke
52813cd350 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>
(cherry picked from commit 24001891dd3d990bf1096cbdd83df4d7bc823f8d)
2016-08-24 11:42:30 +02:00
Martin Schwenke
5159811a49 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>
(cherry picked from commit af502fade13652009e3cf523672ab5e320520042)
2016-08-24 11:42:30 +02:00
Martin Schwenke
386ba3614b 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>
(cherry picked from commit 254d5545f45f97afc737f00542dff985cd76a08e)
2016-08-24 11:42:30 +02:00
Martin Schwenke
965920b19b 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>
(cherry picked from commit 1de8948cb5f4d904dd0d5520c3f13034ed522cb2)
2016-08-24 11:42:30 +02:00
Martin Schwenke
c92614bf4e 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>
(cherry picked from commit bacf57c0658a220c9da6d2dfdf8dd42b9a491556)
2016-08-24 11:42:30 +02:00
Martin Schwenke
d244616bce 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>
(cherry picked from commit 1710b14a3cfac8f6e768c51f7a510b4ed6aac5c7)
2016-08-24 11:42:30 +02:00
Martin Schwenke
693378408c 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>
(cherry picked from commit 94018302fd75c079369fff9492c1e09408e848af)
2016-08-24 11:42:30 +02:00
Martin Schwenke
03d7c48050 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>
(cherry picked from commit 0de52420b8735a50e8681655a49c59d3dab8a61f)
2016-08-24 11:42:30 +02:00
Martin Schwenke
7b1204917b 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>
(cherry picked from commit 0e737348227252d2c0d1708be40753775a9b17ad)
2016-08-24 11:42:29 +02:00
Martin Schwenke
33dd9020ef 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>
(cherry picked from commit ce451c7cc670dad3066ee11c69245d841662844e)
2016-08-24 11:42:29 +02:00
Martin Schwenke
2f10d65e2c 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>
(cherry picked from commit 4bc934f13234ece7fae0d533c23fd879e55b8ad2)
2016-08-24 11:42:29 +02:00
Martin Schwenke
14c7c6a0bf 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>
(cherry picked from commit 6d1099a522de129cee8cdf9183ab3aaabe0592db)
2016-08-24 11:42:29 +02:00
Martin Schwenke
f2c64a965a 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>
(cherry picked from commit 198ca8839175e93988ee52e033195238064aaba5)
2016-08-24 11:42:29 +02:00