[SCM] Samba Shared Repository - branch v4-11-test updated
Karolin Seeger
kseeger at samba.org
Fri Jan 31 13:46:07 UTC 2020
The branch, v4-11-test has been updated
via 0fbf07f0508 s4:torture: Skip the deltest20 as user root
via 394e414b2dc lib:util: Log mkdir error on correct debug levels
via 9349e689a86 s3: lib: nmblib. Clean up and harden nmb packet processing.
from 040e0051e2b VERSION: Bump version up to 4.11.7...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-11-test
- Log -----------------------------------------------------------------
commit 0fbf07f050832185e3d30bffcd8f05b116e1c0bd
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-11-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-11-test): Fri Jan 31 12:31:10 UTC 2020 on sn-devel-184
commit 394e414b2dcdac88189eec19f228ac7bae5e3170
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 9349e689a865ca36acd379968d2cbd490772bc3b
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 727939575a7..0681450bae2 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