blob: df646c800cf462a3b016a0624dcac446de774cb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef HYBBX_PRIVILEGE_H
#define HYBBX_PRIVILEGE_H
#include "hybbx/config.h"
#include "hybbx/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Apply [service] user=/group=/uid=/gid= from @p config.
*
* Linux: hybbxd must not keep running as root. When euid==0, @c user is
* required and privileges drop immediately via setuid/setgid.
* Non-root starts are unchanged (optional @c user must match effective uid).
*/
hybbx_result_t hybbx_privilege_apply_from_config(const hybbx_config_t *config);
#ifdef __cplusplus
}
#endif
#endif /* HYBBX_PRIVILEGE_H */
|