tree-wide: add ERRNO_IS_XATTR_ABSENT() helper
We check the same list of error codes on various xattr operations, and we should on some more. Add a common helper for this purpose.
This commit is contained in:
+1
-1
@@ -3254,7 +3254,7 @@ static int setup_smack(
|
||||
_cleanup_free_ char *exec_label = NULL;
|
||||
|
||||
r = mac_smack_read_fd(executable_fd, SMACK_ATTR_EXEC, &exec_label);
|
||||
if (r < 0 && !IN_SET(r, -ENODATA, -EOPNOTSUPP))
|
||||
if (r < 0 && !ERRNO_IS_XATTR_ABSENT(r))
|
||||
return r;
|
||||
|
||||
r = mac_smack_apply_pid(0, exec_label ? : manager->default_smack_process_label);
|
||||
|
||||
Reference in New Issue
Block a user