diff options
Diffstat (limited to 'src/check_context.c')
-rw-r--r-- | src/check_context.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/check_context.c b/src/check_context.c deleted file mode 100644 index 7471194..0000000 --- a/src/check_context.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <unistd.h> -#include <sys/types.h> -#include <fcntl.h> -#include <stdlib.h> -#include <errno.h> -#include <string.h> -#include <stdio.h> -#include "selinux_internal.h" -#include "policy.h" -#include <limits.h> - -int security_check_context(const char * con) -{ - char path[PATH_MAX]; - int fd, ret; - - if (!selinux_mnt) { - errno = ENOENT; - return -1; - } - - snprintf(path, sizeof path, "%s/context", selinux_mnt); - fd = open(path, O_RDWR); - if (fd < 0) - return -1; - - ret = write(fd, con, strlen(con) + 1); - close(fd); - if (ret < 0) - return -1; - return 0; -} - |