/* 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. *
*/ #ifndef _SAFESETID_H #define _SAFESETID_H
/* Flag indicating whether initialization completed */ externint safesetid_initialized __initdata;
enum sid_policy_type {
SIDPOL_DEFAULT, /* source ID is unaffected by policy */
SIDPOL_CONSTRAINED, /* source ID is affected by policy */
SIDPOL_ALLOWED /* target ID explicitly allowed */
};
typedefunion {
kuid_t uid;
kgid_t gid;
} kid_t;
enum setid_type {
UID,
GID
};
/* * Hash table entry to store safesetid policy signifying that 'src_id' * can set*id to 'dst_id'.
*/ struct setid_rule { struct hlist_node next;
kid_t src_id;
kid_t dst_id;
/* Flag to signal if rule is for UID's or GID's */ enum setid_type type;
};
#define SETID_HASH_BITS 8 /* 256 buckets in hash table */
/* Extension of INVALID_UID/INVALID_GID for kid_t type */ #define INVALID_ID (kid_t){.uid = INVALID_UID}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.