Fix TSAM-1272 : permission check error 29/63229/1 accepted/tizen/common/20160323.184257 submit/tizen/20160323.015601
authorSangkoo Kim <sangkoo.kim@samsung.com>
Wed, 23 Mar 2016 00:13:07 +0000 (09:13 +0900)
committerSangkoo Kim <sangkoo.kim@samsung.com>
Wed, 23 Mar 2016 00:13:07 +0000 (09:13 +0900)
Change-Id: I70a218c917d30deda3c1706c672d13b0d586f46e
Signed-off-by: Sangkoo Kim <sangkoo.kim@samsung.com>
utils/MsgException.cpp
utils/MsgGconfWrapper.cpp

index 556c3f6..da55638 100755 (executable)
@@ -37,7 +37,7 @@ string MsgException::errorStrings[NUM_ERRORS] =
        "INCOMING_MSG_ERROR", //10
 
        "FILE_OPERATION_ERROR",
-       "SECURITY_ERROR"
+       "SECURITY_ERROR",
        "SERVER_READY_ERROR"
 };
 
index d839d56..c636486 100755 (executable)
@@ -117,7 +117,7 @@ msg_error_t MsgSettingGetInt(const char *pKey, int *pVal)
        msg_error_t retVal = MSG_SUCCESS;
        int param = 0;
 
-       if (vconf_get_int(pKey, &param) < 0) {
+       if (vconf_get_int(pKey, &param) != 0) {
                int vconf_err = vconf_get_ext_errno();
                MSG_DEBUG("Fail to vconf_get_int with [%s], err=[%d]", pKey, vconf_err);
                if (vconf_err == VCONF_ERROR_FILE_PERM)
@@ -142,7 +142,7 @@ msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal)
        msg_error_t retVal = MSG_SUCCESS;
        int param = 0;
 
-       if (vconf_get_bool(pKey, &param) < 0) {
+       if (vconf_get_bool(pKey, &param) != 0) {
                int vconf_err = vconf_get_ext_errno();
                MSG_DEBUG("Fail to vconf_get_bool with [%s], err=[%d]", pKey, vconf_err);
                if (vconf_err == VCONF_ERROR_FILE_PERM)
@@ -217,9 +217,9 @@ msg_error_t MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb)
 {
        msg_error_t err = MSG_SUCCESS;
 
-       if (vconf_notify_key_changed(pKey, pCb, NULL) < 0) {
+       if (vconf_notify_key_changed(pKey, pCb, NULL) != 0) {
                int vconf_err = vconf_get_ext_errno();
-               MSG_DEBUG("Fail to regist vconf CB with [%s], err=[%d]", pKey, vconf_err);
+               MSG_DEBUG("Fail to vconf_notify_key_changed with [%s], err=[%d]", pKey, vconf_err);
                if (vconf_err == VCONF_ERROR_FILE_PERM)
                        err = MSG_ERR_PERMISSION_DENIED;
                else
@@ -235,9 +235,9 @@ msg_error_t MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb
 {
        msg_error_t err = MSG_SUCCESS;
 
-       if (vconf_ignore_key_changed(pKey, pCb) < 0) {
+       if (vconf_ignore_key_changed(pKey, pCb) != 0) {
                int vconf_err = vconf_get_ext_errno();
-               MSG_DEBUG("Fail to remove vconf CB with [%s], err=[%d]", pKey, vconf_err);
+               MSG_DEBUG("Fail to vconf_ignore_key_changed [%s], err=[%d]", pKey, vconf_err);
                if (vconf_err == VCONF_ERROR_FILE_PERM)
                        err = MSG_ERR_PERMISSION_DENIED;
                else