From 4bbfeb9c99c838cd17539f9c24016dca8de50fd5 Mon Sep 17 00:00:00 2001 From: Sunwook Bae Date: Thu, 11 Jul 2013 10:50:52 +0900 Subject: [PATCH] Apply the secure logs Change-Id: Id46951f81a11eda017782026a0dd8e06b6411ab8 Signed-off-by: Sunwook Bae --- src/FIo_MessagePortService.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/FIo_MessagePortService.cpp b/src/FIo_MessagePortService.cpp index 0aa9ee1..5aaa6ae 100644 --- a/src/FIo_MessagePortService.cpp +++ b/src/FIo_MessagePortService.cpp @@ -85,7 +85,7 @@ _MessagePortService::RegisterMessagePort(int clientId, const BundleBuffer& buffe String key = GetKey(buffer); String trusted(bundle_get_val(b, TRUSTED_LOCAL)); - SysLog(NID_IO, "Register a message port: [%ls], client = %d", key.GetPointer(), clientId); + SysSecureLog(NID_IO, "Register a message port: [%ls], client = %d", key.GetPointer(), clientId); result r = E_SUCCESS; int value = -1; @@ -94,10 +94,10 @@ _MessagePortService::RegisterMessagePort(int clientId, const BundleBuffer& buffe r = __pTrustedPorts->GetValue(key, value); if (r == E_SUCCESS) { - SysTryReturn(NID_IO, value != clientId, MESSAGEPORT_ERROR_IO_ERROR, E_SYSTEM, + SysSecureTryReturn(NID_IO, value != clientId, MESSAGEPORT_ERROR_IO_ERROR, E_SYSTEM, "[E_SYSTEM] The local message port (%ls) has already registered", key.GetPointer()); - SysLog(NID_IO, "Remove garbage values : %ls", key.GetPointer()); + SysSecureLog(NID_IO, "Remove garbage values : %ls", key.GetPointer()); __pTrustedPorts->Remove(key); } @@ -108,10 +108,10 @@ _MessagePortService::RegisterMessagePort(int clientId, const BundleBuffer& buffe r = __pPorts->GetValue(key, value); if (r == E_SUCCESS) { - SysTryReturn(NID_IO, value != clientId, MESSAGEPORT_ERROR_IO_ERROR, E_SYSTEM, + SysSecureTryReturn(NID_IO, value != clientId, MESSAGEPORT_ERROR_IO_ERROR, E_SYSTEM, "[E_SYSTEM] The local message port (%ls) has already registered", key.GetPointer()); - SysLog(NID_IO, "Remove garbage values : %ls", key.GetPointer()); + SysSecureLog(NID_IO, "Remove garbage values : %ls", key.GetPointer()); __pPorts->Remove(key); } @@ -129,7 +129,7 @@ _MessagePortService::CheckRemotePort(const BundleBuffer& buffer) String key = GetKey(buffer, false); String trusted(bundle_get_val(b, TRUSTED_REMOTE)); - SysLog(NID_IO, "Check a remote message port: [%ls]", key.GetPointer()); + SysSecureLog(NID_IO, "Check a remote message port: [%ls]", key.GetPointer()); bool out = false; @@ -142,7 +142,7 @@ _MessagePortService::CheckRemotePort(const BundleBuffer& buffer) __pPorts->ContainsKey(key, out); } - SysTryReturn(NID_IO, out == true, MESSAGEPORT_ERROR_MESSAGEPORT_NOT_FOUND, E_OBJ_NOT_FOUND, + SysSecureTryReturn(NID_IO, out == true, MESSAGEPORT_ERROR_MESSAGEPORT_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The remote message port (%ls) is not found.", key.GetPointer()); if (trusted.Equals(L"TRUE", false)) @@ -179,7 +179,7 @@ _MessagePortService::UnregisterMessagePort(int clientId) __pPorts->GetValue(key, value); if (value == clientId) { - SysLog(NID_IO, "Unregister - key = %ls", key.GetPointer()); + SysSecureLog(NID_IO, "Unregister - key = %ls", key.GetPointer()); __pPorts->Remove(key); @@ -199,7 +199,7 @@ _MessagePortService::UnregisterMessagePort(int clientId) __pTrustedPorts->GetValue(key, value); if (value == clientId) { - SysLog(NID_IO, "Unregister - key = %ls", key.GetPointer()); + SysSecureLog(NID_IO, "Unregister - key = %ls", key.GetPointer()); __pTrustedPorts->Remove(key); @@ -221,7 +221,7 @@ _MessagePortService::SendMessage(const BundleBuffer& metadata, const BundleBuffe bundle* b = metadata.b; String key = GetKey(metadata, false); - SysLog(NID_IO, "Sends a message to a remote message port [%ls]", key.GetPointer()); + SysSecureLog(NID_IO, "Sends a message to a remote message port [%ls]", key.GetPointer()); String trustedMessage(bundle_get_val(b, TRUSTED_MESSAGE)); if (trustedMessage.Equals(L"TRUE", false)) @@ -233,7 +233,7 @@ _MessagePortService::SendMessage(const BundleBuffer& metadata, const BundleBuffe r = __pPorts->GetValue(key, clientId); } - SysTryReturn(NID_IO, r == E_SUCCESS, MESSAGEPORT_ERROR_MESSAGEPORT_NOT_FOUND, E_OBJ_NOT_FOUND, + SysSecureTryReturn(NID_IO, r == E_SUCCESS, MESSAGEPORT_ERROR_MESSAGEPORT_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The destination message port (%ls) is not found.", key.GetPointer()); if (trustedMessage.Equals(L"TRUE", false)) -- 2.7.4