Lines Matching defs:label
27 #include <selinux/label.h>
156 /* If there's no label to set, then exit without warning */
186 int mac_selinux_apply(const char *path, const char *label) {
190 assert(label);
195 if (setfilecon(path, (security_context_t) label) < 0) {
196 log_enforcing("Failed to set SELinux security context %s on path %s: %m", label, path);
204 int mac_selinux_get_create_label_from_exe(const char *exe, char **label) {
212 assert(label);
226 r = security_compute_create(mycon, fcon, sclass, (security_context_t *) label);
234 int mac_selinux_get_our_label(char **label) {
237 assert(label);
243 r = getcon(label);
251 int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **label) {
262 assert(label);
305 r = security_compute_create(mycon, fcon, sclass, (security_context_t *) label);
313 void mac_selinux_free(char *label) {
319 freecon((security_context_t) label);
379 int mac_selinux_create_socket_prepare(const char *label) {
385 assert(label);
387 if (setsockcreatecon((security_context_t) label) < 0) {
388 log_enforcing("Failed to set SELinux security context %s for sockets: %m", label);
462 /* Binds a socket and label its file system object according to the SELinux policy */