The branch, master has been updated
       via  3633027e49a rpcd_mdssvc: initialize POSIX locking
      from  8b23a4a7eca smbd: Prevent creation of vetoed files

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


- Log -----------------------------------------------------------------
commit 3633027e49aec064e7d890a1f7ec4d81711a5de7
Author: Ralph Boehme <s...@samba.org>
Date:   Thu Apr 6 10:16:46 2023 +0200

    rpcd_mdssvc: initialize POSIX locking
    
    Otherwise the posix_pending_close_db is NULL and we crash when trying to 
close a
    file descriptor:
    
       #4 /usr/lib64/samba/libdbwrap-samba4.so(dbwrap_parse_record+0xe) 
[0x7fbc5d05c8ae]
       #5 /usr/lib64/samba/libdbwrap-samba4.so(dbwrap_fetch_int32+0x38) 
[0x7fbc5d05d438]
       #6 /usr/lib64/samba/libsmbd-base-samba4.so(fd_close_posix+0x7b) 
[0x7fbc5e276f8b]
       #7 /usr/lib64/samba/libsmbd-base-samba4.so(+0x57900) [0x7fbc5e28a900]
       #8 /usr/lib64/samba/libsmbd-base-samba4.so(fd_close+0x68) 
[0x7fbc5e2b7ea8]
       #9 /usr/lib64/samba/libsmbd-base-samba4.so(+0x62608) [0x7fbc5e295608]
       #10 /usr/lib64/samba/libtalloc-samba4.so(_talloc_free+0x51b) 
[0x7fbc5d9f439b]
       #11 /usr/lib64/samba/vfs/fruit.so(+0xcac2) [0x7fbc45fcdac2]
       #12 /usr/lib64/samba/vfs/fruit.so(+0xcbdd) [0x7fbc45fcdbdd]
       #13 /usr/lib64/samba/vfs/fruit.so(+0xf603) [0x7fbc45fd0603]
       #14 /usr/lib64/samba/libsmbd-base-samba4.so(+0x56375) [0x7fbc5e289375]
       #15 /usr/lib64/samba/vfs/nothingtoseeherereally.so(+0x196c) 
[0x7fbc467f996c]
       #16 /usr/lib64/samba/vfs/streams_xattr.so(+0x51fc) [0x7fbc461e71fc]
       #17 /usr/lib64/samba/libsmbd-base-samba4.so(+0xade3a) [0x7fbc5e2e0e3a]
       #18 /usr/lib64/samba/libsmbd-base-samba4.so(create_conn_struct_cwd+0x44) 
[0x7fbc5e2e1cf4]
       #19 /usr/libexec/samba/rpcd_mdssvc(mds_init_ctx+0x2c3) [0x563fdac08f03]
       #20 /usr/libexec/samba/rpcd_mdssvc(_mdssvc_open+0x141) [0x563fdac0b4d1]
    
    The corresponding open is done as part of initializing a connection_struct
    object, where we chdir() and stat() the root path of the share. The stat() 
in
    vfs_fruit causes an expensive metadata request on the path which triggers an
    internal open of a pathref handle. Note that this only affects servers that 
have
    fruit:metadata = netatalk set, which is the default unfortunately.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15354
    
    Signed-off-by: Ralph Boehme <s...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Fri Apr  7 21:12:21 UTC 2023 on atb-devel-224

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

Summary of changes:
 source3/rpc_server/rpcd_mdssvc.c | 8 ++++++++
 1 file changed, 8 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpcd_mdssvc.c b/source3/rpc_server/rpcd_mdssvc.c
index c5b632099fa..4040ae9e0d8 100644
--- a/source3/rpc_server/rpcd_mdssvc.c
+++ b/source3/rpc_server/rpcd_mdssvc.c
@@ -16,6 +16,7 @@
  */
 
 #include "includes.h"
+#include "source3/locking/proto.h"
 #include "rpc_worker.h"
 #include "librpc/gen_ndr/ndr_mdssvc.h"
 #include "librpc/gen_ndr/ndr_mdssvc_scompat.h"
@@ -38,9 +39,16 @@ static size_t mdssvc_servers(
        void *private_data)
 {
        static const struct dcesrv_endpoint_server *ep_servers[1] = { NULL };
+       bool ok;
 
        lp_load_with_shares(get_dyn_CONFIGFILE());
 
+       ok = posix_locking_init(false);
+       if (!ok) {
+               DBG_ERR("posix_locking_init() failed\n");
+               exit(1);
+       }
+
        ep_servers[0] = mdssvc_get_ep_server();
 
        *_ep_servers = ep_servers;


-- 
Samba Shared Repository

Reply via email to