blob: 47022df9d974d56887f360db303e0900a6a12d2f [file] [log] [blame]
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/xattr.h>
#include "selinux_internal.h"
#include "policy.h"
int setfilecon(const char *path, const security_context_t context)
{
return setxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
0);
}