1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
systemd/src/shared/tomoyo-util.c
Zbigniew Jędrzejewski-Szmek d9b02e1697 tree-wide: drop copyright headers from frequent contributors
Fixes #9320.

for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do
  git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms'
done
2018-06-20 11:58:53 +02:00

16 lines
338 B
C

/* SPDX-License-Identifier: LGPL-2.1+ */
#include <unistd.h>
#include "tomoyo-util.h"
bool mac_tomoyo_use(void) {
static int cached_use = -1;
if (cached_use < 0)
cached_use = (access("/sys/kernel/security/tomoyo/version",
F_OK) == 0);
return cached_use;
}