if (ret < 0)
if (matchpathcon(file, mode, &scontext) < 0) {
- dbg("matchpathcon(%s) failed\n", file);
+ err("matchpathcon(%s) failed\n", file);
return;
}
if (setfilecon(file, scontext) < 0)
- dbg("setfilecon %s failed: %s", file, strerror(errno));
+ err("setfilecon %s failed: %s", file, strerror(errno));
freecon(scontext);
}
if (ret < 0)
if (matchpathcon(file, mode, &scontext) < 0) {
- dbg("matchpathcon(%s) failed\n", file);
+ err("matchpathcon(%s) failed\n", file);
return;
}
if (setfscreatecon(scontext) < 0)
- dbg("setfscreatecon %s failed: %s", file, strerror(errno));
+ err("setfscreatecon %s failed: %s", file, strerror(errno));
freecon(scontext);
}
{
if (is_selinux_running()) {
if (setfscreatecon(prev_scontext) < 0)
- dbg("setfscreatecon failed: %s", strerror(errno));
+ err("setfscreatecon failed: %s", strerror(errno));
}
}
* restoration creation purposes.
*/
if (is_selinux_running()) {
+ matchpathcon_init_prefix(NULL, "/dev");
if (getfscreatecon(&prev_scontext) < 0) {
- dbg("getfscreatecon failed\n");
+ err("getfscreatecon failed\n");
prev_scontext = NULL;
}
}