mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
lib: Simplify set_privileges with a struct initialization
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
committed by
Jeremy Allison
parent
b266d39dbb
commit
761ede419f
@ -129,7 +129,7 @@ static bool set_privileges( const struct dom_sid *sid, uint64_t mask )
|
||||
uint8_t privbuf[8];
|
||||
struct dom_sid_buf tmp;
|
||||
fstring keystr;
|
||||
TDB_DATA data;
|
||||
TDB_DATA data = { .dptr = privbuf, .dsize = sizeof(privbuf), };
|
||||
|
||||
if ( !lp_enable_privileges() )
|
||||
return False;
|
||||
@ -149,9 +149,6 @@ static bool set_privileges( const struct dom_sid *sid, uint64_t mask )
|
||||
/* This writes the 64 bit bitmask out in little endian format */
|
||||
SBVAL(privbuf,0,mask);
|
||||
|
||||
data.dptr = privbuf;
|
||||
data.dsize = sizeof(privbuf);
|
||||
|
||||
return NT_STATUS_IS_OK(dbwrap_store_bystring(db, keystr, data,
|
||||
TDB_REPLACE));
|
||||
}
|
||||
|
Reference in New Issue
Block a user