[Issue#] N/A
[Bug] Giving Smack permissions to apps based on permissions list not working.
[Cause] Invalid return code from fscanf() expected.
[Solution] Fix parsing in perm_to_smack() internal function.
[Verification] Run libprivilege-control tests from security-tests.
Change-Id: I9efd05b256e31e2c39bc479db01b744e3169c3f7
}
while (1) {
- if (fscanf(file, format_string, smack_subject, smack_object, smack_accesses) != 1) {
+ if (fscanf(file, format_string, smack_subject, smack_object, smack_accesses) != 3) {
C_LOGE("fscanf failed");
goto out;
}