]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpcd_classic: Open share_info.tdb as root
authorVolker Lendecke <vl@samba.org>
Wed, 13 Dec 2023 11:07:00 +0000 (12:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 Dec 2023 10:15:29 +0000 (10:15 +0000)
srvsvc needs it, but for example NetShareGetInfo() runs as a
user. Opening share_info.tdb at that point is too late.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15265
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/rpc_server/rpcd_classic.c

index 9766d0a760b6063c69616cf3e0c5461810ee3233..2b7e9398d903894367093d76bb0d3e5528c8d631 100644 (file)
@@ -115,6 +115,12 @@ static NTSTATUS classic_servers(
                exit(1);
        }
 
+       status = share_info_db_init();
+       if (!NT_STATUS_IS_OK(status)) {
+               DBG_ERR("share_info_db_init failed: %s\n", nt_errstr(status));
+               exit(1);
+       }
+
        lp_load_with_shares(get_dyn_CONFIGFILE());
 
        mangle_reset_cache();