[SCM] Samba Shared Repository - branch v4-12-test updated
Karolin Seeger
kseeger at samba.org
Fri Jan 31 13:58:02 UTC 2020
The branch, v4-12-test has been updated
via 7b1be793de0 s4:torture: Skip the deltest20 as user root
via 01afd3a9b6d lib:util: Log mkdir error on correct debug levels
via 601b95285ce s3: lib: nmblib. Clean up and harden nmb packet processing.
from 814be2888b3 script/release.sh: make it possible to run from a git worktree
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test
- Log -----------------------------------------------------------------
commit 7b1be793de0da79c3533d221547d19aa89104414
Author: Andreas Schneider <asn at samba.org>
Date: Thu Jan 30 16:18:25 2020 +0100
s4:torture: Skip the deltest20 as user root
The test is meant to be run as a user and not root.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14257
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 16:54:33 UTC 2020 on sn-devel-184
(cherry picked from commit 677bc1b18420e717154dc73f632044239ac3ff9e)
Autobuild-User(v4-12-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-12-test): Fri Jan 31 13:57:54 UTC 2020 on sn-devel-184
commit 01afd3a9b6daaa38fa42410341ed49bb843daed1
Author: Andreas Schneider <asn at samba.org>
Date: Mon Jan 27 14:58:10 2020 +0100
lib:util: Log mkdir error on correct debug levels
For smbd we want an error and for smbclient we only want it in NOTICE
debug level.
The default log level of smbclient is log level 1 so we need notice to
not spam the user.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14253
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
Autobuild-User(master): Günther Deschner <gd at samba.org>
Autobuild-Date(master): Mon Jan 27 15:55:24 UTC 2020 on sn-devel-184
(cherry picked from commit 0ad6a243b259d284064c0c5abcc7d430d55be7e1)
commit 601b95285ce2e30ddfee8bbea4a3ea2d9030947b
Author: Jeremy Allison <jra at samba.org>
Date: Fri Jan 17 13:49:48 2020 -0800
s3: lib: nmblib. Clean up and harden nmb packet processing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14239
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20156
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20157
Credit to oss-fuzz.
No security implications.
Signed-off-by: Jeremy Allison <jra at samba.org>
Pair programmed with: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Jan 21 23:33:41 UTC 2020 on sn-devel-184
(cherry picked from commit ad236bb7590e423b4c69fe6028f2f3495977f48b)
-----------------------------------------------------------------------
Summary of changes:
lib/util/util.c | 7 +++++--
source3/libsmb/nmblib.c | 12 ++++++++----
source4/torture/basic/delete.c | 4 ++++
3 files changed, 17 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/util.c b/lib/util/util.c
index 3bdeded5c1b..0d9ffe5cb7b 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -353,9 +353,12 @@ _PUBLIC_ bool directory_create_or_exist(const char *dname,
old_umask = umask(0);
ret = mkdir(dname, dir_perms);
if (ret == -1 && errno != EEXIST) {
- DBG_WARNING("mkdir failed on directory %s: %s\n",
+ int dbg_level = geteuid() == 0 ? DBGLVL_ERR : DBGLVL_NOTICE;
+
+ DBG_PREFIX(dbg_level,
+ ("mkdir failed on directory %s: %s\n",
dname,
- strerror(errno));
+ strerror(errno)));
umask(old_umask);
return false;
}
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index b6dca800e94..84cbb054b8e 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -192,10 +192,14 @@ static int parse_nmb_name(char *inbuf,int ofs,int length, struct nmb_name *name)
m = ubuf[offset];
- if (!m)
- return(0);
- if ((m & 0xC0) || offset+m+2 > length)
- return(0);
+ /* m must be 32 to exactly fill in the 16 bytes of the netbios name */
+ if (m != 32) {
+ return 0;
+ }
+ /* Cannot go past length. */
+ if (offset+m+2 > length) {
+ return 0;
+ }
memset((char *)name,'\0',sizeof(*name));
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index a8c4e3fa3f1..d14d5a55746 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -1865,6 +1865,10 @@ static bool deltest20(struct torture_context *tctx, struct smbcli_state *cli1, s
NTSTATUS status;
int ret;
+ if (geteuid() == 0) {
+ torture_skip(tctx, "This test doesn't work as user root.");
+ }
+
del_clean_area(cli1, cli2);
/* Test 20 -- non-empty directory hardest to get right... */
--
Samba Shared Repository
More information about the samba-cvs
mailing list