1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-08 16:23:49 +03:00

Revert "rpc_server:srvsvc - retrieve share ACL via root context"

This reverts commit 80c0b41689.

With the previous patch it is no longer required. We open
share_info.tdb as root when starting up rpcd_classic and keep it open.

Commit 80c0b41689 only fixed the
problem in one place, but we had it in a lot more places...

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>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Dec 20 11:20:51 UTC 2023 on atb-devel-224
This commit is contained in:
Volker Lendecke
2023-12-19 10:30:58 +01:00
committed by Stefan Metzmacher
parent ff3b50034e
commit 8cfc6ea923

View File

@@ -542,7 +542,6 @@ static bool is_hidden_share(int snum)
static bool is_enumeration_allowed(struct pipes_struct *p,
int snum)
{
bool allowed;
struct dcesrv_call_state *dce_call = p->dce_call;
struct auth_session_info *session_info =
dcesrv_call_session_info(dce_call);
@@ -559,19 +558,9 @@ static bool is_enumeration_allowed(struct pipes_struct *p,
return false;
}
/*
* share_access_check() must be opened as root
* because it ultimately gets a R/W db handle on share_info.tdb
* which has 0o600 permissions
*/
become_root();
allowed = share_access_check(session_info->security_token,
return share_access_check(session_info->security_token,
lp_servicename(talloc_tos(), lp_sub, snum),
FILE_READ_DATA, NULL);
unbecome_root();
return allowed;
}
/****************************************************************************