| /* SPDX-License-Identifier: GPL-2.0 */ |
| * SafeSetID Linux Security Module |
| * Author: Micah Morton <mortonm@chromium.org> |
| * Copyright (C) 2018 The Chromium OS Authors. |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2, as |
| * published by the Free Software Foundation. |
| #include <linux/uidgid.h> |
| #include <linux/hashtable.h> |
| /* Flag indicating whether initialization completed */ |
| extern int safesetid_initialized; |
| SIDPOL_DEFAULT, /* source ID is unaffected by policy */ |
| SIDPOL_CONSTRAINED, /* source ID is affected by policy */ |
| SIDPOL_ALLOWED /* target ID explicitly allowed */ |
| * Hash table entry to store safesetid policy signifying that 'src_uid' |
| * can setuid to 'dst_uid'. |
| #define SETID_HASH_BITS 8 /* 256 buckets in hash table */ |
| DECLARE_HASHTABLE(rules, SETID_HASH_BITS); |
| enum sid_policy_type _setuid_policy_lookup(struct setuid_ruleset *policy, |
| extern struct setuid_ruleset __rcu *safesetid_setuid_rules; |
| #endif /* _SAFESETID_H */ |