Merge tag 'pm-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / security / safesetid / lsm.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * SafeSetID Linux Security Module
4  *
5  * Author: Micah Morton <mortonm@chromium.org>
6  *
7  * Copyright (C) 2018 The Chromium OS Authors.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2, as
11  * published by the Free Software Foundation.
12  *
13  */
14 #ifndef _SAFESETID_H
15 #define _SAFESETID_H
16
17 #include <linux/types.h>
18
19 /* Flag indicating whether initialization completed */
20 extern int safesetid_initialized;
21
22 /* Function type. */
23 enum safesetid_whitelist_file_write_type {
24         SAFESETID_WHITELIST_ADD, /* Add whitelist policy. */
25         SAFESETID_WHITELIST_FLUSH, /* Flush whitelist policies. */
26 };
27
28 /* Add entry to safesetid whitelist to allow 'parent' to setid to 'child'. */
29 int add_safesetid_whitelist_entry(kuid_t parent, kuid_t child);
30
31 void flush_safesetid_whitelist_entries(void);
32
33 #endif /* _SAFESETID_H */