mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
vfs_posix_eadb.c: prefer capabilities over become_root
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
This commit is contained in:
parent
62464bd2db
commit
92278418dc
@ -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());
|
||||
|
||||
become_root();
|
||||
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
db = tdb_wrap_open(NULL, eadb, 50000,
|
||||
lpcfg_tdb_flags(lp_ctx, TDB_DEFAULT),
|
||||
O_RDWR|O_CREAT, 0600);
|
||||
|
||||
unbecome_root();
|
||||
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
|
||||
talloc_unlink(NULL, lp_ctx);
|
||||
/* now we know dbname is not NULL */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user