1 | /* |
2 | * daemon.h |
3 | * |
4 | * Copyright (C) 2017 Aerospike, Inc. |
5 | * |
6 | * Portions may be licensed to Aerospike, Inc. under one or more contributor |
7 | * license agreements. |
8 | * |
9 | * This program is free software: you can redistribute it and/or modify it under |
10 | * the terms of the GNU Affero General Public License as published by the Free |
11 | * Software Foundation, either version 3 of the License, or (at your option) any |
12 | * later version. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
16 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
17 | * details. |
18 | * |
19 | * You should have received a copy of the GNU Affero General Public License |
20 | * along with this program. If not, see http://www.gnu.org/licenses/ |
21 | */ |
22 | |
23 | #pragma once |
24 | |
25 | #include <stdbool.h> |
26 | #include <sys/types.h> |
27 | |
28 | void cf_process_daemonize(int *fd_ignore_list, int list_size); |
29 | void cf_process_privsep(uid_t uid, gid_t gid); |
30 | void cf_process_add_startup_cap(int cap); |
31 | void cf_process_add_runtime_cap(int cap); |
32 | void cf_process_drop_startup_caps(void); |
33 | bool cf_process_has_cap(int cap); |
34 | void cf_process_enable_cap(int cap); |
35 | void cf_process_disable_cap(int cap); |
36 | |