Skip to content

Commit

Permalink
rpcd_classic: Open share_info.tdb as root
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
vlendec authored and metze-samba committed Dec 20, 2023
1 parent 6d3146f commit ff3b500
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source3/rpc_server/rpcd_classic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ff3b500

Please sign in to comment.