chiark / gitweb /
networkd: vxlan add support for GBP
[elogind.git] / src / shared / smack-util.c
index 64e213489e21726047f71f6898e4f5fd8536fbbf..047aa294f4c0a11610530adb2dd875ca7ec4ebeb 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/xattr.h>
 
 #include "util.h"
+#include "process-util.h"
 #include "path-util.h"
 #include "fileio.h"
 #include "smack-util.h"
@@ -138,7 +139,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
                 return 0;
 
         p = procfs_file_alloca(pid, "attr/current");
-        r = write_string_file(p, label);
+        r = write_string_file(p, label, 0);
         if (r < 0)
                 return r;
 #endif
@@ -187,7 +188,7 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
                 r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0);
 
                 /* If the FS doesn't support labels, then exit without warning */
-                if (r < 0 && errno == ENOTSUP)
+                if (r < 0 && errno == EOPNOTSUPP)
                         return 0;
         }