blob: 38eeabd3d129e5b070d0b894137f4333684e481f [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 fsetfilecon(int fd, const security_context_t context)
{
return fsetxattr(fd, XATTR_NAME_SELINUX, context, strlen(context) + 1,
0);
}