Fixing app_revoke_internal() used by app_revoke_permissions()
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Tue, 14 May 2013 15:36:18 +0000 (17:36 +0200)
committerGerrit Code Review <gerrit2@kim11>
Tue, 21 May 2013 13:00:21 +0000 (22:00 +0900)
[Issue#]        SSDWSSP-260
[Bug/Feature]   Libprivilege-control tests fail
[Cause]         N/A
[Solution]      N/A
[Verification]  Running tests

Change-Id: I72f654279998f4622ce2a9564580242b29ec9d80

src/privilege-control.c

index cbf4093..385e9fe 100644 (file)
@@ -959,8 +959,8 @@ static int app_revoke_permissions_internal(const char* app_id, bool persistent)
                return ret;
        }
 
-       if (persistent && ftruncate(fd, 0) == -1)
-               C_LOGE("file truncate failed");
+       if (persistent && remove(smack_path) != 0)
+               C_LOGE("file remove failed");
 
        return PC_OPERATION_SUCCESS;
 }