Needed by VD division to debug socket clogging problem in the kernel.
Change-Id: Ic1764b8e9342f93911dcf26f6c03fca028a7f72f
/*
- * Copyright (c) 2014-2022 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2014-2023 Samsung Electronics Co., Ltd. All rights reserved.
*
* This file is licensed under the terms of MIT License or the Apache License
* Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
LogError("Error in poll(POLLOUT)");
return SECURITY_MANAGER_ERROR_SOCKET;
}
+ LogWarning("Attempting to send data from client");
const auto temp = TEMP_FAILURE_RETRY(::send(sock.Get(), buffer.Ptr(), buffer.OutputSize(), MSG_NOSIGNAL));
if (temp < 0) {
LogErrno("write");
LogError("Error in poll(POLLIN)");
return SECURITY_MANAGER_ERROR_SOCKET;
}
+ LogWarning("Attempting to receive data from server");
const auto temp = TEMP_FAILURE_RETRY(::recv(sock.Get(), buffer.Ptr(), buffer.InputSize(), 0));
if (temp <= 0) {
if (!temp)
/*
- * Copyright (c) 2013-2022 Samsung Electronics Co., Ltd. All rights reserved
+ * Copyright (c) 2013-2023 Samsung Electronics Co., Ltd. All rights reserved
*
* This file is licensed under the terms of MIT License or the Apache License
* Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
desc.isActiveThisGeneration = true;
auto &buffer = desc.buffer;
+ LogWarning("Attempting to read data on server side");
ssize_t size = read(sock, buffer.Ptr(), buffer.InputSize());
if (size == 0) {
/*
- * Copyright (c) 2014-2022 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2014-2023 Samsung Electronics Co., Ltd. All rights reserved.
*
* This file is licensed under the terms of MIT License or the Apache License
* Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
int call_type_int;
Deserialization::Deserialize(msg.buffer, call_type_int);
SecurityModuleCall call_type = static_cast<SecurityModuleCall>(call_type_int);
+ LogWarning("Processing event from client - smack label: " << msg.creds.label << ", pid: " << msg.creds.pid);
LOG_EXECUTION_TIME(SecurityModuleCallToString(call_type), msg.creds);
switch (call_type) {
case SecurityModuleCall::NOOP:
Throw(ServiceException::InvalidAction);
}
// if we reach this point, the protocol is OK
- LogDebug("Writing response to client.");
+ LogWarning("Event completed, prepared response to client");
return m_serviceManager->Write(msg.connectionID, std::move(msg.buffer));
} Catch(MessageBuffer::Exception::Base) {
LogError("Broken protocol.");