From: Björn Jacke Date: Mon, 25 Mar 2024 16:03:50 +0000 (+0100) Subject: Revert "vfs_posix_eadb.c: prefer capabilities over become_root" X-Git-Tag: tdb-1.4.11~1362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10c7a3e47c62dcb1dfe7e384960d60cafcb9e44e;p=thirdparty%2Fsamba.git Revert "vfs_posix_eadb.c: prefer capabilities over become_root" This reverts commit 92278418dc885ed411f545e73c800ce93f858090. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15583 Signed-off-by: Bjoern Jacke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c index 34769f58a69..b3e21b09b8c 100644 --- a/source3/modules/vfs_posix_eadb.c +++ b/source3/modules/vfs_posix_eadb.c @@ -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 */