Unused function smack_get_access_new removed
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 4 Sep 2013 15:44:47 +0000 (17:44 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 11 Sep 2013 12:48:34 +0000 (14:48 +0200)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] smack_get_access_new is unused
[Cause] N/A
[Solution] Removed

[Verification] Successfull compilation

Change-Id: I3a87d3b55f70ee55b68973b2af71aa5524865bf9

src/privilege-control.c

index dd78219..e4b944c 100644 (file)
@@ -1664,50 +1664,6 @@ API int app_label_dir(const char* label, const char* path)//deprecated
        return ret;
 }
 
-int smack_get_access_new(const char* subject, const char* object, char** label)
-{
-       SECURE_C_LOGD("Entering function: %s. Params: subject=%s, object=%s",
-                               __func__, subject, object);
-       
-       char buff[ACC_LEN] = {'r', 'w', 'x', 'a', 't', 'l'};
-       char perm[2] = {'-'};
-       int i;
-
-       if(!smack_label_is_valid(subject)) {
-               C_LOGE("Invalid param subject.");
-               return PC_ERR_INVALID_PARAM;
-       }
-
-       if(!smack_label_is_valid(object)) {
-               C_LOGE("Invalid param object.");
-               return PC_ERR_INVALID_PARAM;
-       }
-
-       if(!label) {
-               C_LOGE("Invalid param label (NULL).");
-               return PC_ERR_INVALID_PARAM;
-       }
-
-       for (i=0; i<ACC_LEN; ++i) {
-               perm[0] = buff[i];
-               int ret = smack_have_access(subject, object, perm);
-               if (-1 == ret) {
-                       C_LOGE("smack_have_access failed during %c check.", perm[0]);
-                       return PC_ERR_INVALID_OPERATION;
-               }
-               if (0 == ret)
-                       buff[i] = '-';
-       }
-
-       *label = malloc(ACC_LEN+1);
-       if (NULL == *label)
-               return PC_ERR_MEM_OPERATION;
-
-       memcpy(*label, buff, ACC_LEN);
-       (*label)[ACC_LEN] = 0;
-       return PC_OPERATION_SUCCESS;
-}
-
 static int app_uninstall_remove_early_rules(const char *app_id)
 {
        SECURE_C_LOGD("Entering function: %s. Params: app_id=%s",