blob: 45cc2e3e0b9cde026774c3cf94c14b215043bc32 [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 lsetfilecon(const char *path, const security_context_t context)
{
return lsetxattr(path, XATTR_NAME_SELINUX, context, strlen(context) + 1,
0);
}