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

104463 Commits

Author SHA1 Message Date
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
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