[Issue#] N/A
[Bug] Debug log about setting Smack label on file is printed even for files don't matching the mask.
[Cause] Debug log misplaced.
[Solution] Move the log inside if block, checking whether file should be labeled.
[Verification] Build.
Change-Id: I1d83ca6986be8e4a47818e69738a66deda1b9b74
goto out;
}
- C_LOGD("smack_lsetlabel (label: %s (type: %d), path: %s)", label, type, ftsent->fts_path);
if (ftsent->fts_statp->st_mode & S_IFMT & 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;