linux/security/safesetid/lsm.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * SafeSetID Linux Security Module
 *
 * Author: Micah Morton <[email protected]>
 *
 * 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.
 *
 */
#ifndef _SAFESETID_H
#define _SAFESETID_H

#include <linux/types.h>
#include <linux/uidgid.h>
#include <linux/hashtable.h>

/* Flag indicating whether initialization completed */
extern int safesetid_initialized __initdata;

enum sid_policy_type {};

kid_t;

enum setid_type {};

/*
 * Hash table entry to store safesetid policy signifying that 'src_id'
 * can set*id to 'dst_id'.
 */
struct setid_rule {};

#define SETID_HASH_BITS

/* Extension of INVALID_UID/INVALID_GID for kid_t type */
#define INVALID_ID

struct setid_ruleset {};

enum sid_policy_type _setid_policy_lookup(struct setid_ruleset *policy,
		kid_t src, kid_t dst);

extern struct setid_ruleset __rcu *safesetid_setuid_rules;
extern struct setid_ruleset __rcu *safesetid_setgid_rules;

#endif /* _SAFESETID_H */