[Issue#] SSDWSSP-70
[Bug] Internal function dir_set_smack_r() ignores type mask argument.
[Cause] Lack of curly brackets after if.
[Solution] Fix the typo in code.
[Verification] Build, install, run latest tests from security-tests package.
Change-Id: Ibed39f9f103231c904d90299eadfaf93c0524b63
goto out;
}
- if (ftsent->fts_statp->st_mode & type_mask)
+ if (ftsent->fts_statp->st_mode & type_mask) {
C_LOGD("smack_lsetlabel (label: %s (type: %d), path: %s)", label, type, ftsent->fts_path);
if (smack_lsetlabel(ftsent->fts_path, label, type) != 0) {
C_LOGE("smack_lsetlabel failed");
goto out;
}
+ }
}
/* If last call to fts_read() set errno, we need to return error. */