projects
/
platform
/
core
/
security
/
libprivilege-control.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1cb476
)
Truncate Smack file for app in app_revoke_permissions().
author
Rafal Krypa
<r.krypa@samsung.com>
Wed, 17 Apr 2013 12:04:42 +0000
(14:04 +0200)
committer
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Wed, 17 Apr 2013 19:36:15 +0000
(21:36 +0200)
[Issue#] N/A
[Feature] The function removed rules from kernel, but not from disk.
[Cause] It used to remove the file, but removal is now done in app_uninstall().
[Solution] Add explicit truncate.
[Verification] Run tests from security-tests package.
Change-Id: I17e0cf25c95f59762a3b8fcc53a1cdf1d113d3e0
src/privilege-control.c
patch
|
blob
|
history
diff --git
a/src/privilege-control.c
b/src/privilege-control.c
index
a525187
..
54e8e4f
100644
(file)
--- a/
src/privilege-control.c
+++ b/
src/privilege-control.c
@@
-1015,6
+1015,9
@@
API int app_revoke_permissions(const char* app_id)
goto out;
}
+ if (ftruncate(fd, 0) == -1)
+ C_LOGE("file truncate failed");
+
ret = PC_OPERATION_SUCCESS;
out:
if (fd != -1)