// SPDX-License-Identifier: GPL-2.0-or-later /* * * mdp - make dummy policy * * When pointed at a kernel tree, builds a dummy policy for that kernel * with exactly one type with full rights to itself. * * Copyright (C) IBM Corporation, 2006 * * Authors: Serge E. Hallyn <serue@us.ibm.com>
*/
fprintf(fout, "mlsconstrain %s {\n", map->name); for (j = 0; map->perms[j]; j++)
fprintf(fout, "\t%s\n", map->perms[j]); /* * This requires all subjects and objects to be * single-level (l2 eq h2), and that the subject * level dominate the object level (h1 dom h2) * in order to have any permissions to it.
*/
fprintf(fout, "} (l2 eq h2 and h1 dom h2);\n\n");
}
}
/* enable all policy capabilities */ for (i = 0; i < ARRAY_SIZE(selinux_policycap_names); i++)
fprintf(fout, "policycap %s;\n", selinux_policycap_names[i]);
/* * Filesystems whose inodes are labeled from path prefix match * relative to the filesystem root. Depending on the filesystem, * only a single label for all inodes may be supported. Here * we list the filesystem types for which per-file labeling is * supported using genfscon; any other filesystem type can also * be added by only with a single entry for all of its inodes.
*/ #ifdef CONFIG_PROC_FS
GENFSCON("proc", "/"); #endif #ifdef CONFIG_SECURITY_SELINUX
GENFSCON("selinuxfs", "/"); #endif #ifdef CONFIG_SYSFS
GENFSCON("sysfs", "/"); #endif #ifdef CONFIG_DEBUG_FS
GENFSCON("debugfs", "/"); #endif #ifdef CONFIG_TRACING
GENFSCON("tracefs", "/"); #endif #ifdef CONFIG_PSTORE
GENFSCON("pstore", "/"); #endif
GENFSCON("cgroup", "/");
GENFSCON("cgroup2", "/");
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.