* @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
* @version 1.0
* @brief This file constains implementation of common types
- * used in security server.
+ * used in security manager.
*/
-#ifndef _SECURITY_SERVER_CLIENT_
-#define _SECURITY_SERVER_CLIENT_
+#ifndef _SECURITY_MANAGER_CLIENT_
+#define _SECURITY_MANAGER_CLIENT_
#include <vector>
#include <functional>
#include <message-buffer.h>
-#define SECURITY_SERVER_API __attribute__((visibility("default")))
#define SECURITY_MANAGER_API __attribute__((visibility("default")))
-#define SECURITY_SERVER_UNUSED __attribute__((unused))
+#define SECURITY_MANAGER_UNUSED __attribute__((unused))
extern "C" {
struct msghdr;
/*
* sendToServerAncData is special case when we want to receive file descriptor
- * passed by Security Server on behalf of calling process. We can't get it with
+ * passed by Security Manager on behalf of calling process. We can't get it with
* MessageBuffer.
*
* This function should be called _ONLY_ in this particular case.
*
*/
-int sendToServerAncData(char const * const interface, const RawBuffer &send, struct msghdr &hdr);
+int sendToManagerAncData(char const * const interface, const RawBuffer &send, struct msghdr &hdr);
/*
* Decorator function that performs frequently repeated exception handling in
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_CLIENT_
+#endif // _SECURITY_MANAGER_CLIENT_
* @brief Implementatin of MessageBuffer.
*/
-#ifndef _SECURITY_SERVER_SOCKET_BUFFER_
-#define _SECURITY_SERVER_SOCKET_BUFFER_
+#ifndef _SECURITY_MANAGER_SOCKET_BUFFER_
+#define _SECURITY_MANAGER_SOCKET_BUFFER_
#include <vector>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_SOCKET_BUFFER_
+#endif // _SECURITY_MANAGER_SOCKET_BUFFER_
* @file protocols.cpp
* @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
* @version 1.0
- * @brief List of all protocols supported by security server.
+ * @brief List of all protocols supported by security manager.
*/
#include <protocols.h>
* @file protocols.h
* @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
* @version 1.0
- * @brief This file contains list of all protocols suported by security-sever.
+ * @brief This file contains list of all protocols suported by security-manager.
*/
-#ifndef _SECURITY_SERVER_PROTOCOLS_
-#define _SECURITY_SERVER_PROTOCOLS_
+#ifndef _SECURITY_MANAGER_PROTOCOLS_
+#define _SECURITY_MANAGER_PROTOCOLS_
#include <vector>
#include <string>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_PROTOCOLS_
+#endif // _SECURITY_MANAGER_PROTOCOLS_
* @version 1.0
* @brief This file is the implementation file of assert
*/
-#ifndef SECURITY_SERVER_ASSERT_H
-#define SECURITY_SERVER_ASSERT_H
+#ifndef SECURITY_MANAGER_ASSERT_H
+#define SECURITY_MANAGER_ASSERT_H
#include <dpl/noreturn.h>
// Assertion handler procedure
// Do not call directly
// Always use Assert macro
-SECURITYSERVER_NORETURN void AssertProc(const char *condition,
+SECURITYMANAGER_NORETURN void AssertProc(const char *condition,
const char *file,
int line,
const char *function);
__FUNCTION__); \
} } while (0)
-#endif // SECURITY_SERVER_ASSERT_H
+#endif // SECURITY_MANAGER_ASSERT_H
* @version 1.0
* @brief This file is the header file of binary queue
*/
-#ifndef SECURITY_SERVER_BINARY_QUEUE_H
-#define SECURITY_SERVER_BINARY_QUEUE_H
+#ifndef SECURITY_MANAGER_BINARY_QUEUE_H
+#define SECURITY_MANAGER_BINARY_QUEUE_H
//#include <dpl/abstract_input_output.h>
#include <dpl/exception.h>
} // namespace SecurityManager
-#endif // SECURITY_SERVER_BINARY_QUEUE_H
+#endif // SECURITY_MANAGER_BINARY_QUEUE_H
* and html output
*/
-#ifndef SECURITY_SERVER_COLORS_H
-#define SECURITY_SERVER_COLORS_H
+#ifndef SECURITY_MANAGER_COLORS_H
+#define SECURITY_MANAGER_COLORS_H
namespace SecurityManager {
namespace Colors {
} //namespace Colors
} //namespace SecurityManager
-#endif /* SECURITY_SERVER_COLORS_H */
+#endif /* SECURITY_MANAGER_COLORS_H */
* @version 1.0
* @brief Header file for base exception
*/
-#ifndef SECURITY_SERVER_EXCEPTION_H
-#define SECURITY_SERVER_EXCEPTION_H
+#ifndef SECURITY_MANAGER_EXCEPTION_H
+#define SECURITY_MANAGER_EXCEPTION_H
#include <string>
#include <cstring>
{
std::ostringstream message;
message <<
- "\033[1;5;31m\n=== Unhandled SecurityServer exception occurred ===\033[m\n\n";
+ "\033[1;5;31m\n=== Unhandled SecurityManager exception occurred ===\033[m\n\n";
message << "\033[1;33mException trace:\033[m\n\n";
message << e.DumpToString();
message << "\033[1;31m\n=== Will now abort ===\033[m\n";
{
std::ostringstream message;
message <<
- "\033[1;5;31m\n=== Unhandled non-SecurityServer exception occurred ===\033[m\n\n";
+ "\033[1;5;31m\n=== Unhandled non-SecurityManager exception occurred ===\033[m\n\n";
message << "\033[1;31m\n=== Will now abort ===\033[m\n";
return message.str();
}
}
-#endif // SECURITY_SERVER_EXCEPTION_H
+#endif // SECURITY_MANAGER_EXCEPTION_H
*
*/
-#ifndef SECURITY_SERVER_FSTREAM_ACCESSORS_H
-#define SECURITY_SERVER_FSTREAM_ACCESSORS_H
+#ifndef SECURITY_MANAGER_FSTREAM_ACCESSORS_H
+#define SECURITY_MANAGER_FSTREAM_ACCESSORS_H
namespace DPL {
} // namespace DPL
-#endif // SECURITY_SERVER_FSTREAM_ACCESSORS_H
+#endif // SECURITY_MANAGER_FSTREAM_ACCESSORS_H
* @version 1.0
* @brief This file is the implementation file of noncopyable
*/
-#ifndef SECURITYSERVER_NONCOPYABLE_H
-#define SECURITYSERVER_NONCOPYABLE_H
+#ifndef SECURITYMANAGER_NONCOPYABLE_H
+#define SECURITYMANAGER_NONCOPYABLE_H
namespace SecurityManager {
class Noncopyable
};
} // namespace SecurityManager
-#endif // SECURITYSERVER_NONCOPYABLE_H
+#endif // SECURITYMANAGER_NONCOPYABLE_H
* @version 1.0
* @brief This file is the implementation file of noreturn
*/
-#ifndef SECURITYSERVER_NORETURN_H
-#define SECURITYSERVER_NORETURN_H
+#ifndef SECURITYMANAGER_NORETURN_H
+#define SECURITYMANAGER_NORETURN_H
-#define SECURITYSERVER_NORETURN __attribute__((__noreturn__))
+#define SECURITYMANAGER_NORETURN __attribute__((__noreturn__))
-#endif // SECURITYSERVER_NORETURN_H
+#endif // SECURITYMANAGER_NORETURN_H
* @version 1.0
* @brief This file is the implementation file of singleton
*/
-#ifndef SECURITYSERVER_SINGLETON_H
-#define SECURITYSERVER_SINGLETON_H
+#ifndef SECURITYMANAGER_SINGLETON_H
+#define SECURITYMANAGER_SINGLETON_H
namespace SecurityManager {
template<typename Class>
};
} // namespace SecurityManager
-#endif // SECURITYSERVER_SINGLETON_H
+#endif // SECURITYMANAGER_SINGLETON_H
* @version 1.0
* @brief This file is the implementation file of singleton
*/
-#ifndef SECURITYSERVER_SINGLETON_IMPL_H
-#define SECURITYSERVER_SINGLETON_IMPL_H
+#ifndef SECURITYMANAGER_SINGLETON_IMPL_H
+#define SECURITYMANAGER_SINGLETON_IMPL_H
/*
* WARNING!
template SecurityManager::Singleton<Type>&SecurityManager::Singleton<Type>::InternalInstance(); \
template Type & SecurityManager::Singleton<Type>::Instance(); \
-#endif // SECURITYSERVER_SINGLETON_IMPL_H
+#endif // SECURITYMANAGER_SINGLETON_IMPL_H
* @version 1.0
* @brief This file is the implementation file of singleton
*/
-#ifndef SECURITYSERVER_SINGLETON_SAFE_IMPL_H
-#define SECURITYSERVER_SINGLETON_SAFE_IMPL_H
+#ifndef SECURITYMANAGER_SINGLETON_SAFE_IMPL_H
+#define SECURITYMANAGER_SINGLETON_SAFE_IMPL_H
#define IMPLEMENT_SAFE_SINGLETON(Class) \
namespace SecurityManager { \
template Class & Singleton<Class>::Instance(); \
} // namespace SecurityManager
-#endif // SECURITYSERVER_SINGLETON_SAFE_IMPL_H
+#endif // SECURITYMANAGER_SINGLETON_SAFE_IMPL_H
INTERNAL_LOG(
"################################################################################");
INTERNAL_LOG(
- "### SecurityServer assertion failed! ###");
+ "### SecurityManager assertion failed! ###");
INTERNAL_LOG(
"################################################################################");
INTERNAL_LOG("### Condition: " << condition);
* @version 1.0
* @brief This file is the implementation file of abstract log provider
*/
-#ifndef SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
-#define SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
+#ifndef SECURITYMANAGER_ABSTRACT_LOG_PROVIDER_H
+#define SECURITYMANAGER_ABSTRACT_LOG_PROVIDER_H
namespace SecurityManager {
namespace Log {
}
} // namespace SecurityManager
-#endif // SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
+#endif // SECURITYMANAGER_ABSTRACT_LOG_PROVIDER_H
* @version 1.0
* @brief This file is the implementation file of DLOG log provider
*/
-#ifndef SECURITYSERVER_DLOG_LOG_PROVIDER_H
-#define SECURITYSERVER_DLOG_LOG_PROVIDER_H
+#ifndef SECURITYMANAGER_DLOG_LOG_PROVIDER_H
+#define SECURITYMANAGER_DLOG_LOG_PROVIDER_H
#include <dpl/log/abstract_log_provider.h>
#include <memory>
} // namespace Log
} // namespace SecurityManager
-#endif // SECURITYSERVER_DLOG_LOG_PROVIDER_H
+#endif // SECURITYMANAGER_DLOG_LOG_PROVIDER_H
* @version 1.0
* @brief This file is the implementation file of log system
*/
-#ifndef SECURITYSERVER_LOG_H
-#define SECURITYSERVER_LOG_H
+#ifndef SECURITYMANAGER_LOG_H
+#define SECURITYMANAGER_LOG_H
#include <dpl/singleton.h>
#include <dpl/noncopyable.h>
namespace SecurityManager {
namespace Log {
/**
- * SecurityServer log system
+ * SecurityManager log system
*
* To switch logs into old style, export
* DPL_USE_OLD_STYLE_LOGS before application start
#define LogSecureWarning(message) DPL_MACRO_DUMMY_LOGGING(message, SecureWarning)
#endif // BUILD_TYPE_DEBUG
-#endif // SECURITYSERVER_LOG_H
+#endif // SECURITYMANAGER_LOG_H
* @version 1.0
* @brief This file is the implementation file of old style log provider
*/
-#ifndef SECURITYSERVER_OLD_STYLE_LOG_PROVIDER_H
-#define SECURITYSERVER_OLD_STYLE_LOG_PROVIDER_H
+#ifndef SECURITYMANAGER_OLD_STYLE_LOG_PROVIDER_H
+#define SECURITYMANAGER_OLD_STYLE_LOG_PROVIDER_H
#include <dpl/log/abstract_log_provider.h>
#include <string>
}
} // namespace SecurityManager
-#endif // SECURITYSERVER_OLD_STYLE_LOG_PROVIDER_H
+#endif // SECURITYMANAGER_OLD_STYLE_LOG_PROVIDER_H
"DPL_USE_OLD_STYLE_PEDANTIC_LOGS";
const char *OLD_STYLE_LOGS_MASK_ENV_NAME = "DPL_USE_OLD_STYLE_LOGS_MASK";
#endif // BUILD_TYPE_DEBUG
-const char *SECURITY_SERVER_LOG_OFF = "DPL_LOG_OFF";
+const char *SECURITY_MANAGER_LOG_OFF = "DPL_LOG_OFF";
} // namespace anonymous
bool LogSystem::IsLoggingEnabled() const
}
LogSystem::LogSystem() :
- m_isLoggingEnabled(!getenv(SECURITY_SERVER_LOG_OFF))
+ m_isLoggingEnabled(!getenv(SECURITY_MANAGER_LOG_OFF))
{
#ifdef BUILD_TYPE_DEBUG
bool oldStyleLogs = false;
* @brief Implementation of GenericEvent.
*/
-#ifndef _SECURITY_SERVER_GENERIC_EVENT_
-#define _SECURITY_SERVER_GENERIC_EVENT_
+#ifndef _SECURITY_MANAGER_GENERIC_EVENT_
+#define _SECURITY_MANAGER_GENERIC_EVENT_
namespace SecurityManager {
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_GENERIC_EVENT_
+#endif // _SECURITY_MANAGER_GENERIC_EVENT_
* @brief Implementation of GenericSocketService and GenericSocketManager.
*/
-#ifndef _SECURITY_SERVER_GENERIC_SERVICE_MANAGER_
-#define _SECURITY_SERVER_GENERIC_SERVICE_MANAGER_
+#ifndef _SECURITY_MANAGER_GENERIC_SERVICE_MANAGER_
+#define _SECURITY_MANAGER_GENERIC_SERVICE_MANAGER_
#include <vector>
#include <string>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_GENERIC_SERVICE_MANAGER_
+#endif // _SECURITY_MANAGER_GENERIC_SERVICE_MANAGER_
/*
- * security-server
+ * security-manager
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd All Rights Reserved
*
/*
- * security-server
+ * security-manager
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd All Rights Reserved
*
*
*/
-#ifndef SECURITY_SERVER_UTIL_H
-#define SECURITY_SERVER_UTIL_H
+#ifndef SECURITY_MANAGER_UTIL_H
+#define SECURITY_MANAGER_UTIL_H
#include <sys/types.h>
} // namespace SecurityManager
-#endif /*SECURITY_SERVER_UTIL_H*/
+#endif /*SECURITY_MANAGER_UTIL_H*/
* @file sever2-main.cpp
* @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
* @version 1.0
- * @brief Implementation of security-server2
+ * @brief Implementation of security-manager on basis of security-server
*/
#include <stdlib.h>
#include <signal.h>
{
SecurityManager::Singleton<SecurityManager::Log::LogSystem>::Instance().SetTag("SECURITY_MANAGER");
- // This provider may be used in security-server only.
+ // This provider may be used in security-manager only.
// If we add it inside LogSystem constructor it also
- // will be used by security-server-client library.
+ // will be used by security-manager-client library.
SecurityManager::Log::AuditSmackLog *smackLog = new SecurityManager::Log::AuditSmackLog;
if (smackLog->Fail())
delete smackLog;
* @brief Implementation of threads.
*/
-#ifndef _SECURITY_SERVER_SERVICE_THREAD_
-#define _SECURITY_SERVER_SERVICE_THREAD_
+#ifndef _SECURITY_MANAGER_SERVICE_THREAD_
+#define _SECURITY_MANAGER_SERVICE_THREAD_
#include <cassert>
#include <queue>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_SERVICE_THREAD_
+#endif // _SECURITY_MANAGER_SERVICE_THREAD_
* @brief SocketManager implementation.
*/
-#ifndef _SECURITY_SERVER_SOCKET_MANAGER_
-#define _SECURITY_SERVER_SOCKET_MANAGER_
+#ifndef _SECURITY_MANAGER_SOCKET_MANAGER_
+#define _SECURITY_MANAGER_SOCKET_MANAGER_
#include <vector>
#include <queue>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_SOCKET_MANAGER_
+#endif // _SECURITY_MANAGER_SOCKET_MANAGER_
* @brief Implementation of installer service for libprivilege-control encapsulation.
*/
-#ifndef _SECURITY_SERVER_INSTALLER_
-#define _SECURITY_SERVER_INSTALLER_
+#ifndef _SECURITY_MANAGER_INSTALLER_
+#define _SECURITY_MANAGER_INSTALLER_
#include <service-thread.h>
#include <generic-socket-manager.h>
} // namespace SecurityManager
-#endif // _SECURITY_SERVER_INSTALLER_
+#endif // _SECURITY_MANAGER_INSTALLER_