MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / no_new_privs

Function no_new_privs

src/thread/prctl.rs:618–620  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616/// [`prctl(PR_GET_NO_NEW_PRIVS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
617#[inline]
618pub fn no_new_privs() -> io::Result<bool> {
619 unsafe { prctl_1arg(PR_GET_NO_NEW_PRIVS) }.map(|r| r != 0)
620}
621
622const PR_SET_NO_NEW_PRIVS: c_int = 38;
623

Callers 1

test_no_new_privsFunction · 0.50

Calls 1

prctl_1argFunction · 0.85

Tested by 1

test_no_new_privsFunction · 0.40