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

104408 Commits

Author SHA1 Message Date
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
Martin Schwenke
4f6592c969 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>
(cherry picked from commit 518683abfec163a6186c8502c2f9abae6dccb487)
2016-08-24 11:42:29 +02:00
Martin Schwenke
74e25930f1 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>
(cherry picked from commit 1be2cd9dd2fc5093121c12aabf25116a840581f8)
2016-08-24 11:42:29 +02:00
Martin Schwenke
0d74d1d4c1 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>
(cherry picked from commit b92c78a043d20d5d94f5dbb0fed750b820b2f248)
2016-08-24 11:42:29 +02:00
Amitay Isaacs
cf494f8f9c 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>
(cherry picked from commit f635bd8997e2df1ed61429520e19fedb13cad97e)
2016-08-24 11:42:29 +02:00
Amitay Isaacs
0083c2476e 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

(cherry picked from commit 47e6c37dca674f54992ffffb1c9895230c4c9e90)
2016-08-24 11:42:29 +02:00
Amitay Isaacs
b3564463fa 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>
(cherry picked from commit f376f346f25f12b63a11e10d097282c364c1a514)
2016-08-24 11:42:29 +02:00
Amitay Isaacs
8754d07975 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>
(cherry picked from commit 499bfce3e9138e01216170a25b12b404d7430a74)
2016-08-24 11:42:29 +02:00
Amitay Isaacs
2b203f1989 ctdb-ib: Fix DEBUG log messages
https://bugzilla.samba.org/show_bug.cgi?id=12137

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit c0246b4cc2c351dced44d28021ee4139bdf7b288)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
398f904ee3 ctdb-recovery-helper: Fix format-nonliteral warning
... and printf format errors.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit f1a8fb11dda578f194063cdcf2c5dca7000b272b)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
720af0af21 ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 5176354d1279f0e3c216c58ea8637579d9a6a389)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
91bd05f549 ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit fa0015d9adbd3c98957dc61d04b7ffcaa6703e0f)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
38f2415f0c ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit d682ee99810caac489c20d8b673ff4b12a17d75f)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
0d981962b6 ctdb-common: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit b201859372189b6e7d57e078a813861a1533aaf4)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
ca7fa0c854 lib/util: Fix format strings and argument data types
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 24 05:32:15 CEST 2016 on sn-devel-144

(cherry picked from commit 04126d54d5430c5e2fdbbfea58d76b253b81a407)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
6275a94bc7 torture: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b077969a72a8010b7fac37102eb1d0c1a2111fc4)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
3abe405fb4 passdb: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit c1a791e17c6e94c7d33351c420f238b06461a044)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
05758f4ae8 wibindd: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 908c068979dc69ae4664a9fa31e2f91ed115b84a)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
14afd991c1 regedit: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 5855b039ddedd39a81eaf419d771b32e02668cd3)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
058e7c0769 s3-libnet: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 44baf81e8342349a9131acc5d784e65247ac32a6)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
acef41a1e6 s3-netapi: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2d47c2b7a15ce228a201dfda63455acbff981680)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
aa3533973a s3-include: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4b4d3643555a68f585e38e37604ed4ecae9137f5)
2016-08-24 11:42:28 +02:00
Amitay Isaacs
3f635ce444 s3-lib: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e9b8751b587c1eabc4c1a7a7d75e3c4498c6ffc4)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
61423eb2b0 ldb: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a47e95337e96f3e62cde41680d94268f7ce58c6f)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
de35ebd24d lib/util: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 258cf9a170f331992c916569d3b5b52b5d731226)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
0da9c693ad tdb: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b891feaf2b1db064a725e205c861dc6d0c83aca0)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
685aac2c0f talloc: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 5fb54d4d814288b796a075e01c054f607d6ce571)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
d6ece9c5cd s3-lib: Remove unused function sprintf_append
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit d123085f695745cc58f3d6882bfc7ce0893d8b84)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
b216684df5 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

(cherry picked from commit 23b4fb681aa7c02450d0ebb06af87943163b959b)
2016-08-24 11:42:27 +02:00
Amitay Isaacs
78460d1854 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>
(cherry picked from commit a37048f8d49eb72ea89a8708032d4d04dac59f3d)
2016-08-24 11:42:27 +02:00
Michael Adam
f57177f0fb 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

(cherry picked from commit b2bf61307cffd8ff7b6fb9852c107ab763653119)
2016-08-24 11:42:27 +02:00
Michael Adam
294944f6a8 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>
(cherry picked from commit c21976d4b1c604699299f2c0f768c1add93b349d)
2016-08-24 11:42:27 +02:00
Jeremy Allison
7ab1f4fcf7 libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 2a8ccc0841184c2df9fc19f8452009b92071c115)
2016-08-24 11:42:27 +02:00
Jeremy Allison
e217c14f3c s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 27ebf64b347a770e0d1ad4f1db645cb1b8dd5861)
2016-08-24 11:42:27 +02:00
Uri Simchoni
d6e8fd9dcf 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

(cherry picked from commit a6073e6130d39dac58f1e6ea9f41ec4ab34c3e29)
2016-08-24 11:42:27 +02:00
Uri Simchoni
dca2195ab2 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

(cherry picked from commit 3e42b69d5e1216b6af570a09d58040d281bbbf17)
2016-08-24 11:42:26 +02:00
Uri Simchoni
5ffcd2b306 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>
(cherry picked from commit 5bf11f6f5b4dab4cba4b00674bcb76138fb55974)
2016-08-24 11:42:26 +02:00