pub fn with_security_privilege<T, E: From<Error>>(
f: impl FnOnce() -> Result<T, E>,
) -> Result<T, E>Available on Windows only.
Expand description
Runs f with SeSecurityPrivilege enabled on the current thread,
reverting to the process token afterward.
Callers decide whether the operation requires the privilege. In particular,
it is required while opening a handle for ACCESS_SYSTEM_SECURITY and while
setting a SACL, but not while querying a SACL through a handle that already
has ACCESS_SYSTEM_SECURITY access.