forked from netblue30/firejail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jailcheck.h
62 lines (52 loc) · 1.61 KB
/
jailcheck.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Copyright (C) 2014-2021 Firejail Authors
*
* This file is part of firejail project
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef JAILCHECK_H
#define JAILCHECK_H
#include "../include/common.h"
// main.c
extern uid_t user_uid;
extern gid_t user_gid;
extern char *user_name;
extern char *user_home_dir;
extern char *user_run_dir;
// access.c
void access_setup(const char *directory);
void access_test(void);
void access_destroy(void);
// noexec.c
void noexec_setup(void);
void noexec_test(const char *msg);
// sysfiles.c
void sysfiles_setup(const char *file);
void sysfiles_test(void);
// virtual.c
void virtual_setup(const char *directory);
void virtual_destroy(void);
void virtual_test(void);
// apparmor.c
void apparmor_test(pid_t pid);
// seccomp.c
void seccomp_test(pid_t pid);
// utils.c
char *get_sudo_user(void);
char *get_homedir(const char *user, uid_t *uid, gid_t *gid);
int find_child(pid_t pid);
pid_t switch_to_child(pid_t pid);
#endif