From: hhk86.heo Date: Thu, 16 Jun 2016 04:45:39 +0000 (+0900) Subject: resolve TSAM-4887, TSAM-4854: return PERMISSION DENIED error when VCONFKEY_MSG_SERVER... X-Git-Tag: submit/tizen/20160616.115303~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F74901%2F2;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git resolve TSAM-4887, TSAM-4854: return PERMISSION DENIED error when VCONFKEY_MSG_SERVER_READY received VCONF_ERROR_FILE_PERM in openHandle. Change-Id: Ibf928866c002e73c3e50e38799ea030fc3e4c620 Signed-off-by: hyungkang heo --- diff --git a/proxy/MsgHandleControl.cpp b/proxy/MsgHandleControl.cpp index 2eac5dd..1357ceb 100755 --- a/proxy/MsgHandleControl.cpp +++ b/proxy/MsgHandleControl.cpp @@ -45,12 +45,17 @@ MsgHandle::~MsgHandle() void MsgHandle::openHandle() { bool bReady = false; + msg_error_t error = MSG_SUCCESS; MsgProxyListener::instance()->insertOpenHandleSet(this); /* server is currently booting and service is not available until the end of booting */ - if (MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady) != MSG_SUCCESS) + error = MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady); + if (error != MSG_SUCCESS) { MSG_INFO("MsgSettingGetBool() is failed"); + if (error == MSG_ERR_PERMISSION_DENIED) + THROW(MsgException::SECURITY_ERROR, "Client doesn't have permission"); + } if (bReady == false) { THROW(MsgException::SERVER_READY_ERROR, "Msg Server is not ready !!!!!");