Temporary fix for web app launching.
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 15 Feb 2013 11:47:47 +0000 (12:47 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Tue, 26 Mar 2013 10:37:29 +0000 (11:37 +0100)
[Issue#]       N/A
[Feature]      N/A
[Cause]        N/A
[Solution]     Commented reset_permissions() and changed web app label to shorter
[Verification] Compile, install, reboot target

Change-Id: I77e4af57eb9050d1acf2eab24b8ccc1b145887ac

src/privilege-control.c

index f53ce74..028bb8b 100644 (file)
@@ -359,7 +359,7 @@ static app_type_t verify_app_type(const char* type, const char* path)
        C_LOGE("EXIT_FAILURE");
        exit(EXIT_FAILURE);
 }
-
+/*
 static const char* parse_widget_id(const char* path)
 {
        C_LOGD("Enter function: %s", __func__);
@@ -372,7 +372,7 @@ static const char* parse_widget_id(const char* path)
 
        C_LOGD("return widget id: %s", basename);
        return basename;
-}
+}*/
 #endif // SMACK_ENABLED
 
 API int set_app_privilege(const char* name, const char* type, const char* path)
@@ -385,7 +385,8 @@ API int set_app_privilege(const char* name, const char* type, const char* path)
 
        switch(verify_app_type(type, path)) {
        case APP_TYPE_WGT:
-               widget_id = parse_widget_id(path);
+               //widget_id = parse_widget_id(path);
+               widget_id = name;
                if (widget_id == NULL) {
                        C_LOGE("PC_ERR_INVALID_PARAM");
                        ret = PC_ERR_INVALID_PARAM;
@@ -521,14 +522,14 @@ out:
 static int set_smack_for_wrt(const char* widget_id)
 {
        C_LOGD("Enter function: %s", __func__);
+/*
        int ret;
-
        ret = app_reset_permissions(widget_id);
        if (ret != PC_OPERATION_SUCCESS) {
                C_LOGE("app_reset_permissions failed");
                return ret;
        }
-
+*/
        if (smack_set_label_for_self(widget_id) != 0) {
                C_LOGE("smack_set_label_for_self failed");
                return PC_ERR_INVALID_OPERATION;