accesses_apply() continued even if neither 'load' and 'load2' could
not be opened. For 'change-rule' file such semantics do make sense
for backwards compatibility but there's something seriously wrong
if neither 'load' and 'load2' cannot be opened. That's why the only
right thing to do is to stop immediately.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
return -1;
/* fallback */
load_fd = openat(smackfs_mnt_dirfd, "load", O_WRONLY);
- /* Try to continue if the file doesn't exist, we might not need it. */
- if (load_fd < 0 && errno != ENOENT)
+ if (load_fd < 0)
return -1;
load2 = 0;
}