#include <unistd.h>
#include <malloc.h>
#include <sys/un.h>
+
#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#include <selinux/label.h>
if (!newpath)
return -ENOMEM;
- r = selabel_lookup_raw(label_hnd, &filecon, newpath, S_IFDIR);
+ r = selabel_lookup_raw(label_hnd, &filecon, newpath, mode);
}
if (r < 0 && errno != ENOENT)