if (!policy) {
if (r == 0)
r = -errno;
- close_nointr_nofail(fd);
+ safe_close(fd);
log_error("Failed to open %s: %m", entry->d_name);
continue;
}
#endif
-int smack_setup(void) {
+int smack_setup(bool *loaded_policy) {
#ifdef HAVE_SMACK
int r;
+ assert(loaded_policy);
+
r = write_rules("/sys/fs/smackfs/load2", SMACK_CONFIG);
switch(r) {
case -ENOENT:
return 0;
}
+ *loaded_policy = true;
+
#endif
return 0;