/* SPDX-License-Identifier: GPL-2.0 */ /* * A security context is a set of security attributes * associated with each subject and object controlled * by the security policy. Security contexts are * externally represented as variable-length strings * that can be interpreted by a user or application * with an understanding of the security policy. * Internally, the security server uses a simple * structure. This structure is private to the * security server and can be changed without affecting * clients of the security server. * * Author : Stephen Smalley, <stephen.smalley.work@gmail.com>
*/
/* * A security context consists of an authenticated user * identity, a role, a type and a MLS range.
*/ struct context {
u32 user;
u32 role;
u32 type;
u32 len; /* length of string in bytes */ struct mls_range range; char *str; /* string representation if context cannot be mapped. */
};
/* * Sets both levels in the MLS range of 'dst' to the low level of 'src'.
*/ staticinlineint mls_context_cpy_low(struct context *dst, conststruct context *src)
{ int rc;
/* * Sets both levels in the MLS range of 'dst' to the high level of 'src'.
*/ staticinlineint mls_context_cpy_high(struct context *dst, conststruct context *src)
{ int rc;
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.