With loaded_policy set to true mount_setup() relabels /dev properly.
goto finish;
if (ima_setup() < 0)
goto finish;
- if (smack_setup() < 0)
+ if (smack_setup(&loaded_policy) < 0)
goto finish;
dual_timestamp_get(&security_finish_timestamp);
}
#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;
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-int smack_setup(void);
+int smack_setup(bool *loaded_policy);