aboutsummaryrefslogtreecommitdiffstats
path: root/src/jailtest/jailtest.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jailtest/jailtest.h')
-rw-r--r--src/jailtest/jailtest.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/jailtest/jailtest.h b/src/jailtest/jailtest.h
new file mode 100644
index 000000000..10174cc9a
--- /dev/null
+++ b/src/jailtest/jailtest.h
@@ -0,0 +1,58 @@
1/*
2 * Copyright (C) 2014-2021 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#ifndef JAILTEST_H
21#define JAILTEST_H
22
23#include "../include/common.h"
24
25// main.c
26extern uid_t user_uid;
27extern gid_t user_gid;
28extern char *user_name;
29extern char *user_home_dir;
30extern char *user_run_dir;
31
32// access.c
33void access_setup(const char *directory);
34void access_test(void);
35void access_destroy(void);
36
37// noexec.c
38void noexec_setup(void);
39void noexec_test(const char *msg);
40
41// virtual.c
42void virtual_setup(const char *directory);
43void virtual_destroy(void);
44void virtual_test(void);
45
46// apparmor.c
47void apparmor_test(pid_t pid);
48
49// seccomp.c
50void seccomp_test(pid_t pid);
51
52// utils.c
53char *get_sudo_user(void);
54char *get_homedir(const char *user, uid_t *uid, gid_t *gid);
55int find_child(pid_t pid);
56pid_t switch_to_child(pid_t pid);
57
58#endif \ No newline at end of file