OpenVAS Libraries
6.0+beta5
|
Functions | |
int | drop_privileges (gchar *username, GError **error) |
Naive attempt to drop privileges. More... | |
Basic support to drop privileges.
int drop_privileges | ( | gchar * | username, |
GError ** | error | ||
) |
Naive attempt to drop privileges.
We try to drop our (root) privileges and setuid to
username | to minimize the risk of privilege escalation. The current implementation is somewhat linux-specific and may not work on other platforms. | |
[in] | username | The user to become. Its safe to pass "NULL", in which case it will default to "nobody". |
[out] | error | Return location for errors or NULL if not interested in errors. |
error | otherwise and returns the error code. |