Change namespace name to SecurityManager 48/23048/3
authorJan Cybulski <j.cybulski@samsung.com>
Fri, 13 Jun 2014 09:22:08 +0000 (11:22 +0200)
committerJan Cybulski <j.cybulski@samsung.com>
Wed, 18 Jun 2014 13:24:36 +0000 (15:24 +0200)
Change-Id: I43070c39da09a67895ec5eda17bf316ff352a6e7
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
47 files changed:
src/server/client/client-common.cpp
src/server/client/client-common.h
src/server/client/client-security-manager.cpp
src/server/common/connection-info.h
src/server/common/message-buffer.cpp
src/server/common/message-buffer.h
src/server/common/protocols.cpp
src/server/common/protocols.h
src/server/common/smack-check.cpp
src/server/common/smack-check.h
src/server/dpl/core/include/dpl/assert.h
src/server/dpl/core/include/dpl/binary_queue.h
src/server/dpl/core/include/dpl/colors.h
src/server/dpl/core/include/dpl/exception.h
src/server/dpl/core/include/dpl/noncopyable.h
src/server/dpl/core/include/dpl/serialization.h
src/server/dpl/core/include/dpl/singleton.h
src/server/dpl/core/include/dpl/singleton_impl.h
src/server/dpl/core/include/dpl/singleton_safe_impl.h
src/server/dpl/core/src/assert.cpp
src/server/dpl/core/src/binary_queue.cpp
src/server/dpl/core/src/colors.cpp
src/server/dpl/core/src/exception.cpp
src/server/dpl/core/src/noncopyable.cpp
src/server/dpl/log/include/dpl/log/abstract_log_provider.h
src/server/dpl/log/include/dpl/log/audit-smack-log.h
src/server/dpl/log/include/dpl/log/dlog_log_provider.h
src/server/dpl/log/include/dpl/log/log.h
src/server/dpl/log/include/dpl/log/old_style_log_provider.h
src/server/dpl/log/src/abstract_log_provider.cpp
src/server/dpl/log/src/audit-smack-log.cpp
src/server/dpl/log/src/dlog_log_provider.cpp
src/server/dpl/log/src/log.cpp
src/server/dpl/log/src/old_style_log_provider.cpp
src/server/main/generic-event.h
src/server/main/generic-socket-manager.cpp
src/server/main/generic-socket-manager.h
src/server/main/security-manager-util.cpp
src/server/main/security-manager-util.h
src/server/main/server2-main.cpp
src/server/main/service-thread.h
src/server/main/socket-manager.cpp
src/server/main/socket-manager.h
src/server/service/installer.cpp
src/server/service/installer.h
src/server/service/smack-common.cpp
src/server/service/smack-common.h

index 679e00e..e245414 100644 (file)
 
 #include <security-manager.h>
 
-IMPLEMENT_SAFE_SINGLETON(SecurityServer::Log::LogSystem);
+IMPLEMENT_SAFE_SINGLETON(SecurityManager::Log::LogSystem);
 
 namespace {
 
 const int POLL_TIMEOUT = 2000;
 
 void securityClientEnableLogSystem(void) {
-    SecurityServer::Singleton<SecurityServer::Log::LogSystem>::Instance().SetTag("SECURITY_SERVER_CLIENT");
+    SecurityManager::Singleton<SecurityManager::Log::LogSystem>::Instance().SetTag("SECURITY_MANAGER_CLIENT");
 }
 
 int waitForSocket(int sock, int event, int timeout) {
@@ -166,7 +166,7 @@ private:
 
 } // namespace anonymous
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 
 int sendToServer(char const * const interface, const RawBuffer &send, MessageBuffer &recv) {
@@ -267,7 +267,7 @@ int try_catch(const std::function<int()>& func)
     try {
         return func();
     } catch (MessageBuffer::Exception::Base &e) {
-        LogError("SecurityServer::MessageBuffer::Exception " << e.DumpToString());
+        LogError("SecurityManager::MessageBuffer::Exception " << e.DumpToString());
     } catch (std::exception &e) {
         LogError("STD exception " << e.what());
     } catch (...) {
@@ -276,7 +276,7 @@ int try_catch(const std::function<int()>& func)
     return SECURITY_MANAGER_API_ERROR_UNKNOWN;
 }
 
-} // namespace SecurityServer
+} // namespace SecurityMANAGER
 
 static void init_lib(void) __attribute__ ((constructor));
 static void init_lib(void)
index 935bb2d..7569f2f 100644 (file)
@@ -39,7 +39,7 @@ extern "C" {
     struct msghdr;
 }
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 typedef std::vector<unsigned char> RawBuffer;
 
@@ -61,6 +61,6 @@ int sendToServerAncData(char const * const interface, const RawBuffer &send, str
  */
 int try_catch(const std::function<int()>& func);
 
-} // namespace SecuritySever
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_CLIENT_
index 0e5f4d8..e83115d 100644 (file)
@@ -118,7 +118,7 @@ int security_manager_app_inst_req_add_path(app_inst_req *p_req, const char *path
 SECURITY_MANAGER_API
 int security_manager_app_install(const app_inst_req *p_req)
 {
-    using namespace SecurityServer;
+    using namespace SecurityManager;
     MessageBuffer send, recv;
 
     LogDebug("app_install() called");
@@ -157,7 +157,7 @@ int security_manager_app_install(const app_inst_req *p_req)
 SECURITY_MANAGER_API
 int security_manager_app_uninstall(const app_inst_req *p_req)
 {
-    using namespace SecurityServer;
+    using namespace SecurityManager;
     MessageBuffer send, recv;
 
     LogDebug("app_uninstall() called");
index 946b5c8..734ad69 100644 (file)
@@ -29,7 +29,7 @@
 #include <generic-socket-manager.h>
 #include <message-buffer.h>
 
-namespace SecurityServer
+namespace SecurityManager
 {
     struct ConnectionInfo {
         InterfaceID interfaceID;
@@ -37,6 +37,6 @@ namespace SecurityServer
     };
 
     typedef std::map<int, ConnectionInfo> ConnectionInfoMap;
-} //namespace SecurityServer
+} //namespace SecurityManager
 
 #endif //_CONNECTION_INFO_H_
index 3fc090b..66d5b85 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <dpl/log/log.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 void MessageBuffer::Push(const RawBuffer &data) {
     m_buffer.AppendCopy(&data[0], data.size());
@@ -65,5 +65,5 @@ void MessageBuffer::Write(size_t num, const void *bytes) {
     m_buffer.AppendCopy(bytes, num);
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
index 850c7de..ff115e0 100644 (file)
 #include <dpl/exception.h>
 #include <dpl/serialization.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 typedef std::vector<unsigned char> RawBuffer;
 
-class MessageBuffer : public SecurityServer::IStream {
+class MessageBuffer : public SecurityManager::IStream {
 public:
     class Exception
     {
     public:
-        DECLARE_EXCEPTION_TYPE(SecurityServer::Exception, Base)
+        DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
         DECLARE_EXCEPTION_TYPE(Base, OutOfData)
     };
 
@@ -71,9 +71,9 @@ protected:
     }
 
     size_t m_bytesLeft;
-    SecurityServer::BinaryQueue m_buffer;
+    SecurityManager::BinaryQueue m_buffer;
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_SOCKET_BUFFER_
index 7bc9564..24bdae5 100644 (file)
@@ -26,7 +26,7 @@
 #include <cstddef>
 
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 #define SOCKET_PATH_PREFIX "/run/"
 #define SOCKET_PATH_PREFIX_SECURITY_MANAGER SOCKET_PATH_PREFIX "security-manager/"
@@ -34,5 +34,5 @@ namespace SecurityServer {
 char const * const SERVICE_SOCKET_INSTALLER =
         SOCKET_PATH_PREFIX_SECURITY_MANAGER "security-manager-installer.socket";
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
index 7775ccd..ed1c5a6 100644 (file)
@@ -36,7 +36,7 @@ struct app_inst_req {
     std::vector<std::pair<std::string, int>> appPaths;
 };
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 extern char const * const SERVICE_SOCKET_INSTALLER;
 
@@ -46,6 +46,6 @@ enum class SecurityModuleCall
     APP_UNINSTALL
 };
 
-} // namespace SecuritySever
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_PROTOCOLS_
index 0e7bb5a..efc36d7 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <dpl/log/log.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 int smack_runtime_check(void)
 {
@@ -31,4 +31,4 @@ int smack_check(void)
 #endif
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
index 875679c..24578ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  security-server
+ *  security-manager
  *
  *  Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd All Rights Reserved
  *
@@ -21,7 +21,7 @@
 #ifndef _SMACK_CHECK_H_
 #define _SMACK_CHECK_H_
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 /*
  * A very simple runtime check for SMACK on the platform
@@ -37,6 +37,6 @@ int smack_runtime_check(void);
  */
 int smack_check(void);
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SMACK_CHECK_H_
index a71704d..a02aac9 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <dpl/noreturn.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 // Assertion handler procedure
 // Do not call directly
 // Always use Assert macro
@@ -32,9 +32,9 @@ SECURITYSERVER_NORETURN void AssertProc(const char *condition,
                              const char *file,
                              int line,
                              const char *function);
-} // namespace SecurityServer
+} // namespace SecurityManager
 
-#define Assert(Condition) do { if (!(Condition)) { SecurityServer::AssertProc(#Condition, \
+#define Assert(Condition) do { if (!(Condition)) { SecurityManager::AssertProc(#Condition, \
                                                                    __FILE__, \
                                                                    __LINE__, \
                                                                    __FUNCTION__); \
index 387a71a..e007712 100644 (file)
@@ -28,7 +28,7 @@
 #include <memory>
 #include <list>
 
-namespace SecurityServer {
+namespace SecurityManager {
 /**
  * Binary queue auto pointer
  */
@@ -47,7 +47,7 @@ class BinaryQueue
     class Exception
     {
       public:
-        DECLARE_EXCEPTION_TYPE(SecurityServer::Exception, Base)
+        DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
         DECLARE_EXCEPTION_TYPE(Base, OutOfData)
     };
 
@@ -293,6 +293,6 @@ class BinaryQueue
     virtual size_t Write(const BinaryQueue &buffer, size_t bufferSize);
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITY_SERVER_BINARY_QUEUE_H
index 37ce940..69136d1 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef SECURITY_SERVER_COLORS_H
 #define SECURITY_SERVER_COLORS_H
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Colors {
 namespace Text {
 extern const char* BOLD_GREEN_BEGIN;
@@ -68,6 +68,6 @@ extern const char* BOLD_WHITE_BEGIN;
 extern const char* BOLD_WHITE_END;
 } //namespace Html
 } //namespace Colors
-} //namespace SecurityServer
+} //namespace SecurityManager
 
 #endif /* SECURITY_SERVER_COLORS_H */
index ff8d300..f9c2cf2 100644 (file)
@@ -29,7 +29,7 @@
 #include <cstdlib>
 #include <sstream>
 
-namespace SecurityServer {
+namespace SecurityManager {
 void LogUnhandledException(const std::string &str);
 void LogUnhandledException(const std::string &str,
                            const char *filename,
@@ -37,7 +37,7 @@ void LogUnhandledException(const std::string &str,
                            const char *function);
 }
 
-namespace SecurityServer {
+namespace SecurityManager {
 class Exception
 {
   private:
@@ -287,7 +287,7 @@ class Exception
         return m_className;
     }
 };
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #define Try try
 
@@ -332,7 +332,7 @@ class Exception
         Class(const char *path, \
               const char *function, \
               int line, \
-              const SecurityServer::Exception & reason, \
+              const SecurityManager::Exception & reason, \
               const std::string & message = std::string()) :                                                                                                                             \
             BaseClass(path, function, line, reason, message)                                                                            \
         {                                                                                                                                 \
@@ -343,11 +343,11 @@ class Exception
 #define UNHANDLED_EXCEPTION_HANDLER_BEGIN try
 
 #define UNHANDLED_EXCEPTION_HANDLER_END                                                                   \
-    catch (const SecurityServer::Exception &exception)                                                               \
+    catch (const SecurityManager::Exception &exception)                                                               \
     {                                                                                                     \
         std::ostringstream msg;                                                                           \
-        msg << SecurityServer::Exception::KnownExceptionToString(exception);                                         \
-        SecurityServer::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
+        msg << SecurityManager::Exception::KnownExceptionToString(exception);                                         \
+        SecurityManager::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
         abort();                                                                                          \
     }                                                                                                     \
     catch (std::exception& e)                                                                             \
@@ -355,19 +355,19 @@ class Exception
         std::ostringstream msg;                                                                           \
         msg << e.what();                                                                                  \
         msg << "\n";                                                                                      \
-        msg << SecurityServer::Exception::UnknownExceptionToString();                                                \
-        SecurityServer::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
+        msg << SecurityManager::Exception::UnknownExceptionToString();                                                \
+        SecurityManager::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
         abort();                                                                                          \
     }                                                                                                     \
     catch (...)                                                                                           \
     {                                                                                                     \
         std::ostringstream msg;                                                                           \
-        msg << SecurityServer::Exception::UnknownExceptionToString();                                                \
-        SecurityServer::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
+        msg << SecurityManager::Exception::UnknownExceptionToString();                                                \
+        SecurityManager::LogUnhandledException(msg.str(), __FILE__, __LINE__, __FUNCTION__);                          \
         abort();                                                                                          \
     }
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace CommonException {
 /**
  * Internal exception definitions
index dae75e8..8f20bbc 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef SECURITYSERVER_NONCOPYABLE_H
 #define SECURITYSERVER_NONCOPYABLE_H
 
-namespace SecurityServer {
+namespace SecurityManager {
 class Noncopyable
 {
   private:
@@ -33,6 +33,6 @@ class Noncopyable
     Noncopyable();
     virtual ~Noncopyable();
 };
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITYSERVER_NONCOPYABLE_H
index 0c60c4e..bb6602c 100644 (file)
@@ -28,7 +28,7 @@
 #include <map>
 #include <memory>
 
-namespace SecurityServer {
+namespace SecurityManager {
 // Abstract data stream buffer
 class IStream
 {
@@ -393,6 +393,6 @@ struct Deserialization {
         Deserialize(stream, *map);
     }
 }; // struct Deserialization
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SERIALIZATION_H
index b46104f..f089107 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef SECURITYSERVER_SINGLETON_H
 #define SECURITYSERVER_SINGLETON_H
 
-namespace SecurityServer {
+namespace SecurityManager {
 template<typename Class>
 class Singleton :
     private Class
@@ -46,6 +46,6 @@ class Singleton :
 
     static Class &Instance();
 };
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITYSERVER_SINGLETON_H
index 31c054f..00cdbde 100644 (file)
@@ -30,7 +30,7 @@
  * singleton_safe_impl.h if possible.
  */
 
-namespace SecurityServer {
+namespace SecurityManager {
 template<typename Class>
 Singleton<Class>& Singleton<Class>::InternalInstance()
 {
@@ -44,10 +44,10 @@ Class &Singleton<Class>::Instance()
     Singleton<Class>& instance = Singleton<Class>::InternalInstance();
     return instance;
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #define IMPLEMENT_SINGLETON(Type)                                           \
-    template SecurityServer::Singleton<Type>&SecurityServer::Singleton<Type>::InternalInstance();    \
-    template Type & SecurityServer::Singleton<Type>::Instance();                            \
+    template SecurityManager::Singleton<Type>&SecurityManager::Singleton<Type>::InternalInstance();    \
+    template Type & SecurityManager::Singleton<Type>::Instance();                            \
 
 #endif // SECURITYSERVER_SINGLETON_IMPL_H
index abef281..feeb30b 100644 (file)
@@ -23,7 +23,7 @@
 #define SECURITYSERVER_SINGLETON_SAFE_IMPL_H
 
 #define IMPLEMENT_SAFE_SINGLETON(Class)                                        \
-    namespace SecurityServer {                                                                \
+    namespace SecurityManager {                                                    \
     template<>                                                                     \
     Singleton<Class>&Singleton<Class>::InternalInstance()                         \
     {                                                                              \
@@ -40,6 +40,6 @@
                                                                                \
     template Singleton<Class>&Singleton<Class>::InternalInstance();               \
     template Class & Singleton<Class>::Instance();                                  \
-    } // namespace SecurityServer
+    } // namespace SecurityManager
 
 #endif // SECURITYSERVER_SINGLETON_SAFE_IMPL_H
index 440b03a..ba1cecc 100644 (file)
@@ -26,7 +26,7 @@
 #include <dpl/exception.h>
 #include <cstdlib>
 
-namespace SecurityServer {
+namespace SecurityManager {
 void AssertProc(const char *condition,
                 const char *file,
                 int line,
@@ -37,7 +37,7 @@ void AssertProc(const char *condition,
     {                                                                  \
         std::ostringstream platformLog;                                \
         platformLog << message;                                        \
-        SecurityServer::Log::LogSystemSingleton::Instance().Pedantic(             \
+        SecurityManager::Log::LogSystemSingleton::Instance().Pedantic(             \
             platformLog.str().c_str(),                                 \
             __FILE__, __LINE__, __FUNCTION__);                         \
     } \
@@ -65,4 +65,4 @@ void AssertProc(const char *condition,
     // Fail with c-library abort
     abort();
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
index be0c65d..72817a6 100644 (file)
@@ -27,7 +27,7 @@
 #include <cstring>
 #include <new>
 
-namespace SecurityServer {
+namespace SecurityManager {
 BinaryQueue::BinaryQueue() :
     m_size(0)
 {}
@@ -314,4 +314,4 @@ size_t BinaryQueue::Write(const BinaryQueue &buffer, size_t bufferSize)
     AppendCopyFrom(buffer);
     return bufferSize;
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
index 6563a26..3682668 100644 (file)
@@ -23,7 +23,7 @@
 #include <stddef.h>
 #include <dpl/colors.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Colors {
 namespace Text {
 const char* BOLD_GREEN_BEGIN = "\033[1;32m";
@@ -67,4 +67,4 @@ const char* BOLD_WHITE_BEGIN = "<font color=\"white\"><b>";
 const char* BOLD_WHITE_END = "</b></font>";
 } //namespace Html
 } //namespace Colors
-} //namespace SecurityServer
+} //namespace SecurityManager
index d1635bc..211a69f 100644 (file)
@@ -24,7 +24,7 @@
 #include <dpl/log/log.h>
 #include <cstdio>
 
-namespace SecurityServer {
+namespace SecurityManager {
 Exception* Exception::m_lastException = NULL;
 unsigned int Exception::m_exceptionCount = 0;
 void (*Exception::m_terminateHandler)() = NULL;
@@ -51,7 +51,7 @@ void LogUnhandledException(const std::string &str,
     printf("%s\n", msg.str().c_str());
 
     // Logging to dlog
-    SecurityServer::Log::LogSystemSingleton::Instance().Error(
+    SecurityManager::Log::LogSystemSingleton::Instance().Error(
         str.c_str(), filename, line, function);
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
index c58e25a..e3a0987 100644 (file)
 #include <stddef.h>
 #include <dpl/noncopyable.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 Noncopyable::Noncopyable()
 {}
 
 Noncopyable::~Noncopyable()
 {}
-} // namespace SecurityServer
+} // namespace SecurityManager
index 7679924..04a000f 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
 #define SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 class AbstractLogProvider
 {
@@ -76,6 +76,6 @@ class AbstractLogProvider
     static const char *LocateSourceFileName(const char *filename);
 };
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITYSERVER_ABSTRACT_LOG_PROVIDER_H
index 912ad53..98fdc15 100644 (file)
@@ -33,7 +33,7 @@
 #include <memory>
 #include <functional>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 
 class AuditSmackLog :
@@ -110,5 +110,5 @@ private:
 };
 
 }  // namespace Log
-}  // namespace SecurityServer
+}  // namespace SecurityManager
 #endif  // _AUDIT_SMACK_LOG_
index cd76c46..1d80ff7 100644 (file)
@@ -26,7 +26,7 @@
 #include <memory>
 #include <string>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 class DLOGLogProvider :
     public AbstractLogProvider
@@ -89,6 +89,6 @@ class DLOGLogProvider :
 };
 
 } // namespace Log
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITYSERVER_DLOG_LOG_PROVIDER_H
index 9d8403a..e8f3665 100644 (file)
@@ -28,7 +28,7 @@
 #include <sstream>
 #include <list>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 /**
  * SecurityServer log system
@@ -168,7 +168,7 @@ class NullStream
  */
 typedef Singleton<LogSystem> LogSystemSingleton;
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 //
 // Log support
@@ -178,18 +178,18 @@ typedef Singleton<LogSystem> LogSystemSingleton;
 /* avoid warnings about unused variables */
 #define DPL_MACRO_DUMMY_LOGGING(message, function)                         \
     do {                                                                   \
-        SecurityServer::Log::NullStream ns;                                \
+        SecurityManager::Log::NullStream ns;                                \
         ns << message;                                                     \
     } while (0)
 
 #define DPL_MACRO_FOR_LOGGING(message, function)                           \
 do                                                                         \
 {                                                                          \
-    if (SecurityServer::Log::LogSystemSingleton::Instance().IsLoggingEnabled())   \
+    if (SecurityManager::Log::LogSystemSingleton::Instance().IsLoggingEnabled())   \
     {                                                                      \
         std::ostringstream platformLog;                                    \
         platformLog << message;                                            \
-        SecurityServer::Log::LogSystemSingleton::Instance().function(      \
+        SecurityManager::Log::LogSystemSingleton::Instance().function(      \
             platformLog.str().c_str(),                                     \
             __FILE__, __LINE__, __FUNCTION__);                             \
     }                                                                      \
index 91eeb80..60b8cf9 100644 (file)
@@ -25,7 +25,7 @@
 #include <dpl/log/abstract_log_provider.h>
 #include <string>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 class OldStyleLogProvider :
     public AbstractLogProvider
@@ -99,6 +99,6 @@ class OldStyleLogProvider :
                       const char *function);
 };
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // SECURITYSERVER_OLD_STYLE_LOG_PROVIDER_H
index 1da7bba..5b7574c 100644 (file)
@@ -25,7 +25,7 @@
 
 #define UNUSED __attribute__((unused))
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 
 void AbstractLogProvider::SetTag(const char *tag UNUSED) {}
index 8960b51..1d03b6f 100644 (file)
@@ -53,7 +53,7 @@ const std::string AUDIT_LOG_SMACK_LABEL = "security-manager::audit-files";
 
 } // namespace anonymous
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 
 AuditSmackLog::AuditSmackLog()
@@ -307,4 +307,4 @@ void AuditSmackLog::SecureError(const char *message UNUSED,
 }
 
 } // namespace Log
-} // namespace SecurityServer
+} // namespace SecurityManager
index ffe23da..c96dfd0 100644 (file)
@@ -27,7 +27,7 @@
 
 #define UNUSED __attribute__((unused))
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 std::string DLOGLogProvider::FormatMessage(const char *message,
                                            const char *filename,
@@ -149,4 +149,4 @@ void DLOGLogProvider::SmackAudit(const char *message UNUSED,
 }
 
 } // nemespace Log
-} // namespace SecurityServer
+} // namespace SecurityManager
index ef67fb2..0b1a528 100644 (file)
@@ -28,9 +28,9 @@
 #include <dpl/log/old_style_log_provider.h>
 #include <dpl/log/audit-smack-log.h>
 
-IMPLEMENT_SINGLETON(SecurityServer::Log::LogSystem)
+IMPLEMENT_SINGLETON(SecurityManager::Log::LogSystem)
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 namespace // anonymous
 {
@@ -291,4 +291,4 @@ void LogSystem::SmackAudit(const char *message,
 }
 
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
index 4c10749..b3ea65a 100644 (file)
 #include <unistd.h>
 #include <dlog.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 namespace // anonymous
 {
-using namespace SecurityServer::Colors::Text;
+using namespace SecurityManager::Colors::Text;
 const char *DEBUG_BEGIN = GREEN_BEGIN;
 const char *DEBUG_END = GREEN_END;
 const char *INFO_BEGIN = CYAN_BEGIN;
@@ -310,4 +310,4 @@ void OldStyleLogProvider::SmackAudit(const char *message,
 }
 
 }
-} // namespace SecurityServer
+} // namespace SecurityManager
index 30d9e88..8e70ae3 100644 (file)
 #ifndef _SECURITY_SERVER_GENERIC_EVENT_
 #define _SECURITY_SERVER_GENERIC_EVENT_
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 struct GenericEvent {
     virtual ~GenericEvent(){}
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_GENERIC_EVENT_
index 5bf0695..1e6bc5e 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <generic-socket-manager.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 class SendMsgData::Internal {
 public:
@@ -112,5 +112,5 @@ int SendMsgData::flags() {
     return m_flags;
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
index 4417a30..8603eab 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 struct msghdr;
 } // extern "C"
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 typedef int InterfaceID;
 
@@ -138,6 +138,6 @@ struct GenericSocketManager {
     virtual ~GenericSocketManager(){}
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_GENERIC_SERVICE_MANAGER_
index b0febfa..030c5ca 100644 (file)
@@ -33,7 +33,7 @@ namespace {
 const size_t SIZE_T_MAX = std::numeric_limits<size_t>::max();
 } // namespace anonymous
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 int util_smack_label_is_valid(const char *smack_label)
 {
@@ -112,5 +112,5 @@ char *read_exe_path_from_proc(pid_t pid)
     return exe;
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
index 3bb37d4..611696e 100644 (file)
 
 #include <sys/types.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 int util_smack_label_is_valid(const char *smack_label);
 char *read_exe_path_from_proc(pid_t pid);
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif /*SECURITY_SERVER_UTIL_H*/
index 42f72e7..0111e42 100644 (file)
 
 #include <installer.h>
 
-IMPLEMENT_SAFE_SINGLETON(SecurityServer::Log::LogSystem);
+IMPLEMENT_SAFE_SINGLETON(SecurityManager::Log::LogSystem);
 
 #define REGISTER_SOCKET_SERVICE(manager, service) \
     registerSocketService<service>(manager, #service)
 
 template<typename T>
-void registerSocketService(SecurityServer::SocketManager &manager, const std::string& serviceName)
+void registerSocketService(SecurityManager::SocketManager &manager, const std::string& serviceName)
 {
     T *service = NULL;
     try {
@@ -47,7 +47,7 @@ void registerSocketService(SecurityServer::SocketManager &manager, const std::st
         service->Create();
         manager.RegisterSocketService(service);
         service = NULL;
-    } catch (const SecurityServer::Exception &exception) {
+    } catch (const SecurityManager::Exception &exception) {
         LogError("Error in creating service " << serviceName <<
                  ", details:\n" << exception.DumpToString());
     } catch (const std::exception& e) {
@@ -65,16 +65,16 @@ int main(void) {
 
     UNHANDLED_EXCEPTION_HANDLER_BEGIN
     {
-        SecurityServer::Singleton<SecurityServer::Log::LogSystem>::Instance().SetTag("SECURITY_SERVER");
+        SecurityManager::Singleton<SecurityManager::Log::LogSystem>::Instance().SetTag("SECURITY_MANAGER");
 
         // This provider may be used in security-server only.
         // If we add it inside LogSystem constructor it also
         // will be used by security-server-client library.
-        SecurityServer::Log::AuditSmackLog *smackLog = new SecurityServer::Log::AuditSmackLog;
+        SecurityManager::Log::AuditSmackLog *smackLog = new SecurityManager::Log::AuditSmackLog;
         if (smackLog->Fail())
             delete smackLog;
         else
-            SecurityServer::Singleton<SecurityServer::Log::LogSystem>::Instance().AddProvider(smackLog);
+            SecurityManager::Singleton<SecurityManager::Log::LogSystem>::Instance().AddProvider(smackLog);
 
         sigset_t mask;
         sigemptyset(&mask);
@@ -86,9 +86,9 @@ int main(void) {
         }
 
         LogInfo("Start!");
-        SecurityServer::SocketManager manager;
+        SecurityManager::SocketManager manager;
 
-        REGISTER_SOCKET_SERVICE(manager, SecurityServer::InstallerService);
+        REGISTER_SOCKET_SERVICE(manager, SecurityManager::InstallerService);
 
         manager.MainLoop();
     }
index e5989e6..71c6e3f 100644 (file)
@@ -40,7 +40,7 @@
 
 #define DEFINE_THREAD_EVENT(eventType)                                \
     void Event(const eventType &event) {                              \
-        SecurityServer::ServiceThread<ParentClassName>::              \
+        SecurityManager::ServiceThread<ParentClassName>::              \
             Event(event,                                              \
                   this,                                               \
                   &ParentClassName::EventInternal##eventType);        \
 
 #define DECLARE_THREAD_EVENT(eventType, methodName)                   \
     void Event(const eventType &event) {                              \
-        SecurityServer::ServiceThread<ParentClassName>::              \
+        SecurityManager::ServiceThread<ParentClassName>::              \
             Event(event,                                              \
                   this,                                               \
                   &ParentClassName::methodName);                      \
     }
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 template <class Service>
 class ServiceThread {
@@ -172,6 +172,6 @@ protected:
     bool m_quit;
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_SERVICE_THREAD_
index e7d2f3f..c9f497b 100644 (file)
@@ -52,7 +52,7 @@ const time_t SOCKET_TIMEOUT = 20;
 
 } // namespace anonymous
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 struct DummyService : public GenericSocketService {
     ServiceDescriptionVector GetServiceDescription() {
@@ -728,4 +728,4 @@ void SocketManager::CloseSocket(int sock) {
     FD_CLR(sock, &m_writeSet);
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
index b7b733c..fdc6516 100644 (file)
 
 #include <generic-socket-manager.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 class SocketManager : public GenericSocketManager {
 public:
     class Exception {
     public:
-        DECLARE_EXCEPTION_TYPE(SecurityServer::Exception, Base)
+        DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
         DECLARE_EXCEPTION_TYPE(Base, InitFailed)
     };
     SocketManager();
@@ -130,6 +130,6 @@ protected:
     std::priority_queue<Timeout> m_timeoutQueue;
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_SOCKET_MANAGER_
index 0445c78..20829fd 100644 (file)
@@ -41,7 +41,7 @@
 #include "smack-rules.h"
 #include "security-manager-common.h"
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 namespace {
 
@@ -507,4 +507,4 @@ bool InstallerService::processAppUninstall(MessageBuffer &buffer, MessageBuffer
     return true;
 }
 
-} // namespace SecurityServer
+} // namespace SecurityManager
index 45c95f6..43bf1db 100644 (file)
 #include <message-buffer.h>
 #include <connection-info.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 class InstallerException
 {
 public:
-    DECLARE_EXCEPTION_TYPE(SecurityServer::Exception, Base)
+    DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
     DECLARE_EXCEPTION_TYPE(Base, InvalidAction)
 };
 
 class InstallerService :
-    public SecurityServer::GenericSocketService,
-    public SecurityServer::ServiceThread<InstallerService>
+    public SecurityManager::GenericSocketService,
+    public SecurityManager::ServiceThread<InstallerService>
 {
 public:
     InstallerService();
@@ -90,6 +90,6 @@ private:
     bool processAppUninstall(MessageBuffer &buffer, MessageBuffer &send);
 };
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif // _SECURITY_SERVER_INSTALLER_
index 4eb5907..dcb14bb 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <smack-check.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 int get_smack_label_from_process(pid_t pid, char *smack_label)
 {
@@ -114,5 +114,5 @@ int smack_pid_have_access(pid_t pid,
 
 
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
index 49698b6..fd12ecc 100644 (file)
@@ -3,11 +3,11 @@
 
 #include <sys/types.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 
 int get_smack_label_from_process(pid_t pid, char *smack_label);
 int smack_pid_have_access(pid_t pid, const char *object, const char *access_type);
 
-} // namespace SecurityServer
+} // namespace SecurityManager
 
 #endif