[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Nov 16 20:53:03 UTC 2018
The branch, master has been updated
via be46a427745 smbtorture: Close unused pipe fds in kernel_oplocks8
via 579ce3eb4e5 dsdb: Slightly simplify samdb_check_password
via da1d7af1a7b lib: Fix CID 1441264 Error handling issues (CHECKED_RETURN)
from 0872f140c4a torture: Fix the 32-bit build
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit be46a42774590f68f8560d82f8425a43fecda98b
Author: Christof Schmitt <cs at samba.org>
Date: Wed Nov 14 15:13:03 2018 -0700
smbtorture: Close unused pipe fds in kernel_oplocks8
This fixes a hang of the testcase when hitting an error in the child (e.g.
localdir does not exist)
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Nov 16 21:52:13 CET 2018 on sn-devel-144
commit 579ce3eb4e5b14159cfe20d00f0ba7e4801f2944
Author: Volker Lendecke <vl at samba.org>
Date: Thu Nov 15 10:40:50 2018 +0100
dsdb: Slightly simplify samdb_check_password
Avoid an "else" where we have the early return
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Björn Baumbach <bbaumbach at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit da1d7af1a7b15c91742568849c07f796512a93cf
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 14 21:02:01 2018 +0100
lib: Fix CID 1441264 Error handling issues (CHECKED_RETURN)
This is not worth keeping a CID around :-)
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/lib/gencache.c | 14 ++++++++++----
source4/dsdb/common/util.c | 21 ++++++++++-----------
source4/torture/smb2/oplock.c | 2 ++
3 files changed, 22 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index d7c3ad32921..d6ef28c140f 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -130,10 +130,16 @@ static int gencache_prune_expired_fn(struct tdb_context *tdb,
}
if (!ok || expired) {
- /*
- * Ignore failure, this is "just" background cleanup
- */
- strv_add(state->mem_ctx, &state->keys, (char *)key.dptr);
+ int ret;
+
+ ret = strv_add(state->mem_ctx, &state->keys, (char *)key.dptr);
+ if (ret != 0) {
+ /*
+ * Exit the loop. It's unlikely that it will
+ * succeed next time.
+ */
+ return -1;
+ }
}
return 0;
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index e7b860df1bc..7ce5168c6c7 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2153,17 +2153,16 @@ enum samr_ValidationStatus samdb_check_password(TALLOC_CTX *mem_ctx,
DEBUG(0, ("check_password_complexity: check password script took too long!\n"));
TALLOC_FREE(password_script);
return SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR;
- } else {
- DEBUG(5,("check_password_complexity: check password script (%s) "
- "returned [%d]\n", password_script, check_ret));
-
- if (check_ret != 0) {
- DEBUG(1,("check_password_complexity: "
- "check password script said new password is not good "
- "enough!\n"));
- TALLOC_FREE(password_script);
- return SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH;
- }
+ }
+ DEBUG(5,("check_password_complexity: check password script (%s) "
+ "returned [%d]\n", password_script, check_ret));
+
+ if (check_ret != 0) {
+ DEBUG(1,("check_password_complexity: "
+ "check password script said new password is not good "
+ "enough!\n"));
+ TALLOC_FREE(password_script);
+ return SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH;
}
TALLOC_FREE(password_script);
diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c
index 800a4cf299f..8bbb641ea72 100644
--- a/source4/torture/smb2/oplock.c
+++ b/source4/torture/smb2/oplock.c
@@ -4956,12 +4956,14 @@ static bool wait_for_child_oplock(struct torture_context *tctx,
char c;
/* Parent. */
TALLOC_FREE(name);
+ close(fds[1]);
ret = sys_read(fds[0], &c, 1);
torture_assert(tctx, ret == 1, "read failed");
return true;
}
/* Child process. */
+ close(fds[0]);
ret = do_child_process(fds[1], name);
_exit(ret);
/* Notreached. */
--
Samba Shared Repository
More information about the samba-cvs
mailing list