[SCM] Samba Shared Repository - branch v4-10-test updated

Karolin Seeger kseeger at samba.org
Mon Feb 3 14:11:03 UTC 2020


The branch, v4-10-test has been updated
       via  677362ca796 lib:util: Log mkdir error on correct debug levels
       via  9fd10a2cacd s4:torture: Skip the deltest20 as user root
       via  55177a44258 s3: lib: nmblib. Clean up and harden nmb packet processing.
      from  9dca42f43b3 VERSION: Bump version up to 4.10.14...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-10-test


- Log -----------------------------------------------------------------
commit 677362ca7961ae93ad9de537bea10de842b3534d
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)
    
    Autobuild-User(v4-10-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-10-test): Mon Feb  3 14:10:49 UTC 2020 on sn-devel-144

commit 9fd10a2cacd753de75a9dcb9a2ee0f7f38fb2b97
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)

commit 55177a44258dceee3aa3ae4966f56f422a9a5aad
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 dc1772c839e..3a1c8738581 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -200,9 +200,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