1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Revert "vfs_posix_eadb.c: prefer capabilities over become_root"

This reverts commit 92278418dc.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15583
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 10c7a3e47c)
This commit is contained in:
Björn Jacke 2024-03-25 17:03:50 +01:00 committed by Jule Anger
parent d0c295e534
commit f6d549de47

View File

@ -213,12 +213,12 @@ static bool posix_eadb_init(int snum, struct tdb_wrap **p_db)
lp_ctx = loadparm_init_s3(NULL, loadparm_s3_helpers());
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
become_root();
db = tdb_wrap_open(NULL, eadb, 50000,
lpcfg_tdb_flags(lp_ctx, TDB_DEFAULT),
O_RDWR|O_CREAT, 0600);
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
unbecome_root();
talloc_unlink(NULL, lp_ctx);
/* now we know dbname is not NULL */