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

Jule Anger janger at samba.org
Mon Jan 8 14:03:02 UTC 2024


The branch, v4-19-test has been updated
       via  c6c14c07d37 docs-xml: use XML_CATALOG_FILES env var if defined
       via  a8ab61b8ab2 winbind_nss_netbsd: fix missing semicolon
       via  2084a27c9ab s3:utils: Fix the auth function to print correct values to the user
       via  98e62c70894 s3:utils: Handle the domain before username and password
       via  3a39e21d087 doc-xml: fix name of vfs_linux_xfs man page
       via  f11643fee31 smbd: Fix traversing snapshot dirs that vanished in current fileset
       via  e97ec6ffb7a shadow_copy: Add test for missing directory in "current" fileset
      from  50f74d04884 s3:smbd multichannel: always refresh the network information

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


- Log -----------------------------------------------------------------
commit c6c14c07d3772e14ef7985843dde25f7775ddf17
Author: Björn Jacke <bjacke at samba.org>
Date:   Mon Dec 25 19:50:55 2023 +0100

    docs-xml: use XML_CATALOG_FILES env var if defined
    
    Thanks to Thierry LARONDE for the fix.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15540
    
    Signed-off-by: Björn Jacke <bjacke at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit b9f32b32e0e1463b8ca3e696d682ecf86503464b)
    
    Autobuild-User(v4-19-test): Jule Anger <janger at samba.org>
    Autobuild-Date(v4-19-test): Mon Jan  8 14:02:25 UTC 2024 on atb-devel-224

commit a8ab61b8ab290fc4e8bd099df570a54fc8eaa35f
Author: Björn Jacke <bjacke at samba.org>
Date:   Mon Dec 25 19:53:30 2023 +0100

    winbind_nss_netbsd: fix missing semicolon
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15541
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit b41f95f891ab5b1d1878735a513be5d9a13f63c6)

commit 2084a27c9ab27215699ea89a6023cf8bb6bb0429
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Dec 15 08:23:25 2023 +0100

    s3:utils: Fix the auth function to print correct values to the user
    
    In order to show correct values in the password prompt displayed by
    cli_credentials_get_password*(). We need to set the domain and username
    in the credentials system.
    
    The credentials supplied via the SMB URL have a higher priority than the
    command line options.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15538
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 1134c4f3a63c9618c3fb79abefb40a798c7c1701)

commit 98e62c70894f0094b25231b38691bdd62bc0d637
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Dec 15 09:41:06 2023 +0100

    s3:utils: Handle the domain before username and password
    
    The cli_credentials_get_password*() function will interactively ask the
    user for a password if none has been supplied via another ways. To show
    the correct domain and username in the prompt, we need handle domain
    and user first.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15538
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 25021b836f74d3d247bce44c6c02a2d8b2cc39ea)

commit 3a39e21d087bc796da7329920c2ce561aeeb796b
Author: Björn Jacke <bjacke at samba.org>
Date:   Mon Dec 25 19:49:38 2023 +0100

    doc-xml: fix name of vfs_linux_xfs man page
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15542
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from commit 2073bbf9dcab5fabe5e683c12e16c195239fcba1)

commit f11643fee31995ea1124e4b0e53cd980d2056e5f
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 28 14:38:37 2023 +0100

    smbd: Fix traversing snapshot dirs that vanished in current fileset
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jan  2 20:37:01 UTC 2024 on atb-devel-224
    
    (cherry picked from commit 2cfbf43f706d5d29a5b1a5b13aac0661e42da0b1)

commit e97ec6ffb7aeeaf7d3faa29691aa613c94c71a22
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 28 14:20:11 2023 +0100

    shadow_copy: Add test for missing directory in "current" fileset
    
    Right now we can't traverse a subdirectory in a snapshot which was
    deleted in the current set of files.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=15544
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit a0bfadb32b83ab1e58290f84c298d345e21866d9)

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/wafsamba.py            |  2 +-
 docs-xml/manpages/vfs_linux_xfs_sgid.8.xml |  4 ++--
 nsswitch/winbind_nss_netbsd.c              |  2 +-
 source3/script/tests/test_shadow_copy.sh   | 27 ++++++++++++++++++++++
 source3/smbd/filename.c                    |  2 +-
 source3/utils/smbget.c                     | 37 ++++++++++++++++--------------
 6 files changed, 52 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 40c7b866fba..2d20eabbc8b 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -1183,7 +1183,7 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None):
     bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl'
     bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl'
     bld.env.SAMBA_CATALOG = bld.bldnode.abspath() + '/docs-xml/build/catalog.xml'
-    bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog file://' + bld.env.SAMBA_CATALOG
+    bld.env.SAMBA_CATALOGS = os.getenv('XML_CATALOG_FILES', 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog') + ' file://' + bld.env.SAMBA_CATALOG
 
     for m in manpages.split():
         source = [m + '.xml']
diff --git a/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml b/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
index 73820339a9b..a0117dc17b3 100644
--- a/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
+++ b/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
@@ -3,7 +3,7 @@
 <refentry id="vfs_linux_xfs_sgid.8">
 
 <refmeta>
-	<refentrytitle>vfs_syncops</refentrytitle>
+	<refentrytitle>vfs_linux_xfs_sgid</refentrytitle>
 	<manvolnum>8</manvolnum>
 	<refmiscinfo class="source">Samba</refmiscinfo>
 	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
@@ -49,7 +49,7 @@
 <refsect1>
 	<title>EXAMPLES</title>
 
-	<para>Add syncops functionality for [share]:</para>
+	<para>Add linux_xfs_sgid functionality for [share]:</para>
 <programlisting>
         <smbconfsection name="[share]"/>
 	<smbconfoption name="vfs objects">linux_xfs_sgid</smbconfoption>
diff --git a/nsswitch/winbind_nss_netbsd.c b/nsswitch/winbind_nss_netbsd.c
index 94552639b7b..473fa50037c 100644
--- a/nsswitch/winbind_nss_netbsd.c
+++ b/nsswitch/winbind_nss_netbsd.c
@@ -185,7 +185,7 @@ netbsdwinbind_getgroupmembership(void *nsrv, void *nscb, va_list ap)
 	};
 	struct winbindd_response response = {
 		.length = 0,
-	}
+	};
 	gid_t	*wblistv;
 	int	wblistc, i, isdup, dupc;
 
diff --git a/source3/script/tests/test_shadow_copy.sh b/source3/script/tests/test_shadow_copy.sh
index b5726e4b833..3141df3568d 100755
--- a/source3/script/tests/test_shadow_copy.sh
+++ b/source3/script/tests/test_shadow_copy.sh
@@ -389,6 +389,32 @@ test_shadow_copy_format()
         failed=`expr $failed + 1`
 }
 
+# Test fetching a file where there's no current version of it
+test_missing_basedir()
+{
+    local share
+    local where
+    local prefix
+    local snapidx
+
+    share=$1
+    where=$2
+    prefix=$3
+    snapidx=$4
+
+    #delete snapshots from previous tests
+    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+    build_snapshots $WORKDIR/$where "$prefix" "$snapidx" "$snapidx"
+
+    (cd "$WORKDIR/$where"/share; mv bar _bar)
+
+    testit "fetch a file without a latest version" \
+	test_fetch_snap_file "$share" "bar/baz" "$snapidx" || \
+	failed=`expr $failed + 1`
+
+    (cd "$WORKDIR/$where"/share; mv _bar bar)
+}
+
 #build "latest" files
 build_files $WORKDIR/mount base/share "latest" "latest"
 
@@ -423,5 +449,6 @@ test_shadow_copy_format shadow_fmt2 mount/base share 2 "shadow:format with some
 test_shadow_copy_format shadow_fmt3 mount/base share 2 "shadow:format with modified format"
 test_shadow_copy_format shadow_fmt4 mount/base share 3 "shadow:format with snapprefix"
 test_shadow_copy_format shadow_fmt5 mount/base share 6 "shadow:format with delimiter"
+test_missing_basedir shadow3 "mount/base" "share" 6
 
 exit $failed
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index b00f85171ca..8693dcf1153 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -1120,7 +1120,7 @@ static NTSTATUS filename_convert_dirfsp_nosymlink(
 						      conn,
 						      conn->cwd_fsp,
 						      dirname,
-						      0,
+						      twrp,
 						      posix,
 						      &smb_dirname,
 						      &symlink_err);
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 598607ea391..f7f83b06496 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -116,22 +116,23 @@ static void get_auth_data_with_context_fn(SMBCCTX *ctx,
 	const char *domain = NULL;
 	enum credentials_obtained obtained = CRED_UNINITIALISED;
 
-	username = cli_credentials_get_username_and_obtained(creds, &obtained);
-	if (username != NULL) {
+	domain = cli_credentials_get_domain_and_obtained(creds, &obtained);
+	if (domain != NULL) {
 		bool overwrite = false;
-		if (usr[0] == '\0') {
+		if (dom[0] == '\0') {
 			overwrite = true;
 		}
 		if (obtained >= CRED_CALLBACK_RESULT) {
 			overwrite = true;
 		}
 		if (overwrite) {
-			strncpy(usr, username, usr_len - 1);
+			strncpy(dom, domain, dom_len - 1);
 		}
 	}
+	cli_credentials_set_domain(creds, dom, obtained);
 
-	password = cli_credentials_get_password_and_obtained(creds, &obtained);
-	if (password != NULL) {
+	username = cli_credentials_get_username_and_obtained(creds, &obtained);
+	if (username != NULL) {
 		bool overwrite = false;
 		if (usr[0] == '\0') {
 			overwrite = true;
@@ -140,33 +141,35 @@ static void get_auth_data_with_context_fn(SMBCCTX *ctx,
 			overwrite = true;
 		}
 		if (overwrite) {
-			strncpy(pwd, password, pwd_len - 1);
+			strncpy(usr, username, usr_len - 1);
 		}
 	}
+	cli_credentials_set_username(creds, usr, obtained);
 
-	domain = cli_credentials_get_domain_and_obtained(creds, &obtained);
-	if (domain != NULL) {
+	password = cli_credentials_get_password_and_obtained(creds, &obtained);
+	if (password != NULL) {
 		bool overwrite = false;
-		if (usr[0] == '\0') {
+		if (pwd[0] == '\0') {
 			overwrite = true;
 		}
 		if (obtained >= CRED_CALLBACK_RESULT) {
 			overwrite = true;
 		}
 		if (overwrite) {
-			strncpy(dom, domain, dom_len - 1);
+			strncpy(pwd, password, pwd_len - 1);
 		}
 	}
+	cli_credentials_set_password(creds, pwd, obtained);
 
-	smbc_set_credentials_with_fallback(ctx, domain, username, password);
+	smbc_set_credentials_with_fallback(ctx, dom, usr, pwd);
 
-	if (!opt.quiet && username != NULL) {
-		if (username[0] == '\0') {
+	if (!opt.quiet) {
+		if (usr[0] == '\0') {
 			printf("Using guest user\n");
+		} else if (dom[0] == '\0') {
+			printf("Using user: %s\n", usr);
 		} else {
-			printf("Using domain: %s, user: %s\n",
-				domain,
-				username);
+			printf("Using domain: %s, user: %s\n", dom, usr);
 		}
 	}
 }


-- 
Samba Shared Repository



More information about the samba-cvs mailing list