Greenbone Vulnerability Management Libraries: base/drop_privileges.h Source File

Greenbone Vulnerability Management Libraries 23.1.2

drop_privileges.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2010-2023 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
10
11#ifndef _GVM_BASE_DROP_PRIVILEGES_H
12#define _GVM_BASE_DROP_PRIVILEGES_H
13
14#include <glib.h>
15
19#define GVM_DROP_PRIVILEGES \
20 g_quark_from_static_string ("gvm-drop-privileges-error-quark")
21
25#define GVM_DROP_PRIVILEGES_ERROR_ALREADY_SET -1
26
30#define GVM_DROP_PRIVILEGES_OK 0
31
35#define GVM_DROP_PRIVILEGES_FAIL_NOT_ROOT 1
36
40#define GVM_DROP_PRIVILEGES_FAIL_UNKNOWN_USER 2
41
45#define GVM_DROP_PRIVILEGES_FAIL_DROP_GID 3
46
50#define GVM_DROP_PRIVILEGES_FAIL_DROP_UID 4
51
55#define GVM_DROP_PRIVILEGES_FAIL_SUPPLEMENTARY 5
56
57int
58 drop_privileges (gchar *username, GError **error);
59
60#endif /* not _GVM_BASE_DROP_PRIVILEGES_H */
drop_privileges
int drop_privileges(gchar *username, GError **error)
Drop privileges.
Definition drop_privileges.c:58