The branch, master has been updated
       via  a3f129f6634 s3:smbd: disable "vfs mkdir use tmp name = auto" on 
OpenBSD
      from  9675d8aed8e ctdb-utils: Fix incorrect FSF address

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a3f129f66346dcec41a01caf8060fe1a9da484ac
Author: Ralph Boehme <s...@samba.org>
Date:   Tue Mar 4 17:33:44 2025 +0100

    s3:smbd: disable "vfs mkdir use tmp name = auto" on OpenBSD
    
    This is the simplest way to avoid a regression.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15801
    
    Pair-Programmed-With: Stefan Metzmacher <me...@samba.org>
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <me...@samba.org>
    Autobuild-Date(master): Wed Mar  5 12:37:40 UTC 2025 on atb-devel-224

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

Summary of changes:
 docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml |  2 ++
 source3/smbd/open.c                            | 13 +++++++++++++
 source3/wscript                                |  3 +++
 3 files changed, 18 insertions(+)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml 
b/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml
index 92a39f8f541..a0d733c47f8 100644
--- a/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml
+++ b/docs-xml/smbdotconf/vfs/vfsmkdirusetmpname.xml
@@ -31,6 +31,8 @@
        <smbconfoption name="inherit permissions"/>,
        <smbconfoption name="nt acl support"/> or
        <smbconfoption name="store dos attributes"/>.
+       Note on OpenBSD Auto (the default) is mapped to <constant>no</constant>,
+       see <ulink 
url="https://bugzilla.samba.org/show_bug.cgi?id=15801";>https://bugzilla.samba.org/show_bug.cgi?id=15801</ulink>.
        </para>
 
        <para>
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3982c39ed47..771734f6203 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -4564,6 +4564,19 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
                need_tmpname = true;
        }
 
+#ifdef OPENBSD
+       /*
+        * OpenBSD requires to have write permissions
+        * on both source and destimation of renameat(),
+        * see https://bugzilla.samba.org/show_bug.cgi?id=15801
+        *
+        * For now just disable the new code by default.
+        */
+       if (vfs_use_tmp == Auto) {
+               vfs_use_tmp = false;
+       }
+#endif
+
        if (vfs_use_tmp != Auto) {
                need_tmpname = vfs_use_tmp;
        }
diff --git a/source3/wscript b/source3/wscript
index f3c819a77d4..bf77040fd4f 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -457,6 +457,9 @@ vsyslog
             conf.DEFINE('HAVE_FREEBSD_SUNACL_H', '1')
             conf.CHECK_FUNCS_IN(['acl'], 'sunacl')
         conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
+    elif (host_os.rfind('openbsd') > -1):
+        conf.DEFINE('OPENBSD', 1)
+        conf.DEFINE('STAT_ST_BLOCKSIZE', '512')
     elif (host_os.rfind('irix') > -1):
         conf.DEFINE('IRIX', 1)
         conf.DEFINE('STAT_ST_BLOCKSIZE', '512')


-- 
Samba Shared Repository

Reply via email to