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 679e00e5b6ea1f39beacb150463fcbe1f529f47f..e245414ea54d14d2deda1316f69467efeb673f17 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 935bb2d2e8e9b617afa6aa50e243a4785a88dfe7..7569f2f249e8e6a18372736d85a21b7f3ed80d37 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 0e5f4d8d1cc737bd677ca0658d3ffe1ab57288e5..e83115d2671350f13df4364bd914bb76496e9e1e 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 946b5c8defc50ed883401de17447f983b076a298..734ad69cb9487f3f228367b2091ed0a815ab091a 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 3fc090beff0a56f64d176e351f0e4490e95a2de9..66d5b851f6fe411991cd87330be6514cd109cea0 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 850c7de8c6807fff4d75ad5fbebb0f5a8ce8c5df..ff115e0fb4e8b36302ee0ce5182198fe622079d7 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 7bc9564076954e0fe8f5a93ab524c3a7ff74d3d9..24bdae5c612284dc9d091eb5d2ea5232e8ca1e44 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 7775ccd06d62b1b2e288cd03f2475eb265d3472f..ed1c5a6bd9d0c8cdbe4547166aef8fd37db8e365 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 0e7bb5af5594bba6b789732c590d9db3d9f9088b..efc36d7fe7dfba8d1d3a348804e2698c2b88a071 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 875679ceb0f62378d6d8fd86e4cc7b02b53ceeb2..24578ae76e98f1c9a75a04cd5aafb4c4641ac5cb 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 a71704dcb4364cab2efba829da982ff49a48a10f..a02aac94e44154d2959b9952ff33595f1ab38efb 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 387a71aee1d0881e3a5ac480662b916e3e0914ea..e0077124d0f833acfb52ef48e58abaa953cb3801 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 37ce9408e0aec1ab4e858f6ef00dd4b7bd03214c..69136d17c2299280ca4d9be04ffb177564479f58 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 ff8d3008e47b0fdbaeffc363c3e7ac90970a6ba1..f9c2cf2ff445971a71e72421779484f5ca8bade8 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 dae75e83d0fa902ea6ca1622f4cc504b81e4db42..8f20bbc055689d26c2f024891cf5824d520b2f82 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 0c60c4e1b3a6751bb9e5a19c36a003bf169d3a80..bb6602c4828f50307c0adfd2eb2dd95a951ecabc 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 b46104f7fa9cc58bd3e76d8c24d3120c185f0874..f089107b0664db5288257f8bb75bd53ced054466 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 31c054fd7e8f05bfff6c3da1cde2d166e4257d14..00cdbde32ef1618ad89e6bc6468765807ebf92e3 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 abef281b89320f68a1cb5eb8167afff7eefc5135..feeb30befc9b16b8cbca871356edf8ed8db9ae71 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 440b03a69fef7d6ef6b857dc0eb647ee06f90472..ba1cecca3856bfa510ccbc36b6ed705b80e96955 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 be0c65d41f1407ec25a7a5d70994e5a93441da20..72817a6728671f22da1cdab64b3f542ceced4fbf 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 6563a26c30c08ebad17d9ee092920ba41add7dba..3682668d9e1f46d65f021294fbbb15f3dd58919d 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 d1635bc7ebe5d8e47c49809578006a13d13bdc37..211a69f66f13a831751fcb6c29de8fd02e9fb52b 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 c58e25ae0540adc442e4067d02fab9d55d67ac38..e3a09874e8c66d5bc5cbcc0d3899035df27dd560 100644 (file)
 #include <stddef.h>
 #include <dpl/noncopyable.h>
 
-namespace SecurityServer {
+namespace SecurityManager {
 Noncopyable::Noncopyable()
 {}
 
 Noncopyable::~Noncopyable()
 {}
-} // namespace SecurityServer
+} // namespace SecurityManager
index 76799243e669578cff6782ed332575871e54e6b3..04a000f1a4ce68a6c177f89a5462df105f8c2fe5 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 912ad539715da547dedbdc63a970ac723356b823..98fdc15fe5a91c9971726bd4ddab81e4897387fc 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 cd76c4666c27ce206117b9a6152f3ceeea3d8f28..1d80ff75536a1dcf127f7f2bfb922fae347bfc39 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 9d8403a66158cdafdc9cf14022e8fa6c1b1d4151..e8f3665e2791d7e93a156b2fd2880c80738068ca 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 91eeb804bf9f40e3d79b81ae074cc4d755574438..60b8cf90642da46857bc859165f09c375c25ca48 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 1da7bba15429bd1ff4377f0594f65ac1c3b22bbb..5b7574cc03de9f6ab297a01285147dd4757ee105 100644 (file)
@@ -25,7 +25,7 @@
 
 #define UNUSED __attribute__((unused))
 
-namespace SecurityServer {
+namespace SecurityManager {
 namespace Log {
 
 void AbstractLogProvider::SetTag(const char *tag UNUSED) {}
index 8960b5160a64c8a15dcb838a67a25dce10b525a8..1d03b6f42e6baed6b692cfd181822b4059aa5dc8 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 ffe23da39c234c765c5165889957a5862cb94fd5..c96dfd05a44272789b4c094599513ece1de35913 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 ef67fb2781d82e964de7f16e05642531609a75d0..0b1a5288cb86ddb324c9b35ec310b83b91859fc4 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 4c10749240faa0c0f2dd377fc52016e5aed5a4f2..b3ea65a48595a9c3d9ca343b213b8f3fbc06e51d 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 30d9e88bbc8e851e05a8800c02ddfac1715b1eb0..8e70ae386e7fff041a277105785294e0e6863d6d 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 5bf069500c105d6c9069ab6cd1123886841f4e4d..1e6bc5ef74d7af768fb8fc8c8ee923c7807f6f2a 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 4417a30eb7708e0811defa2393eea6ef9928e1a7..8603eabf8164770278dd5a3455881dc987409896 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 b0febfaf3ce7b4cc4d65efa0ae9c899140ea88a1..030c5ca1cc4da5a1854f747af99c8e20b6d5ec92 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 3bb37d4911b322051a8b5c84cb68221f14def64e..611696e972cbf8807b60868d525b654d42a90c14 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 42f72e7c94479e185dc9be51386ece00e2ac3c7e..0111e42ecc787632009a139b36cd81bdcc1a1077 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 e5989e64d30669d689ec258f1c3b32e20a52df43..71c6e3fe0249ca2408a9ea846c20805fdd6af830 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 e7d2f3f9dd08dc4c26cb806c5f6d14bb10f4368d..c9f497bfb64f72a7e05ed7d0de2f9d975138ee27 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 b7b733c2c707ec5b73cec9356abdb2b0a77fb305..fdc6516d8585005a4adc2c6d274d32504bea8fee 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 0445c78633bcb4255c2f25aeac263ec74786a672..20829fdd0edb89d5aa49a615a48f6eba19c1f766 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 45c95f6067ee2c953f71147fcd12aac2f2590937..43bf1db62b24a3ea7b296b21260e459ced1b2b6e 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 4eb59073631d9b1843740c70c06f415cdbfdb15b..dcb14bb6ce0b6b2dcc1aa52151f20e18614ad7df 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 49698b641c3b7866a97ae1643f4b4588af1f35ea..fd12ecc47f3058dc40f1a2363914fa60dd988eda 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