Change package name to security-manager. 12/23012/3
authorJan Cybulski <j.cybulski@samsung.com>
Fri, 13 Jun 2014 07:22:32 +0000 (09:22 +0200)
committerJan Cybulski <j.cybulski@samsung.com>
Tue, 17 Jun 2014 10:13:26 +0000 (12:13 +0200)
Change filenames according to new package name.
Change server binary file name to security-manager
Update CMake files accordingly

Change-Id: Ic7dbcf5a401055c38a637b8edf4ebdb5b6be8d49
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
16 files changed:
CMakeLists.txt
packaging/security-manager.manifest [moved from packaging/security-server.manifest with 100% similarity]
packaging/security-manager.spec [moved from packaging/security-server.spec with 77% similarity]
security-manager-audit.conf [moved from security-server-audit.conf with 100% similarity]
src/CMakeLists.txt
src/server/dpl/log/src/audit-smack-log.cpp
src/server/dpl/log/src/dlog_log_provider.cpp
src/server/main/security-manager-util.cpp [moved from src/server/main/security-server-util.cpp with 98% similarity]
src/server/main/security-manager-util.h [moved from src/server/main/security-server-util.h with 100% similarity]
src/server/service/installer.cpp
systemd/CMakeLists.txt
systemd/security-manager-installer.socket
systemd/security-manager.service [new file with mode: 0644]
systemd/security-manager.target [new file with mode: 0644]
systemd/security-server.service [deleted file]
systemd/security-server.target [deleted file]

index d3e2657..282a76b 100644 (file)
@@ -20,7 +20,7 @@
 ############################# Check minimum CMake version #####################
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT("security-server")
+PROJECT("security-manager")
 
 ############################# cmake packages ##################################
 
@@ -58,9 +58,10 @@ IF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
     ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG")
 ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
 
-SET(TARGET_SECURITY_SERVER "security-server")
+
+SET(TARGET_SECURITY_MANAGER "security-manager")
 SET(TARGET_SECURITY_MANAGER_CLIENT "security-manager-client")
-SET(TARGET_SERVER_COMMON "security-server-commons")
+SET(TARGET_SERVER_COMMON "security-manager-commons")
 
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(build)
similarity index 77%
rename from packaging/security-server.spec
rename to packaging/security-manager.spec
index a2f085f..48c2f49 100644 (file)
@@ -1,11 +1,11 @@
-Name:       security-server
-Summary:    Security server and utilities
-Version:    0.0.119
+Name:       security-manager
+Summary:    Security manager and utilities
+Version:    0.0.1
 Release:    1
 Group:      Security/Service
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-Source1:    security-server.manifest
+Source1:    security-manager.manifest
 Source3:    libsecurity-manager-client.manifest
 BuildRequires: cmake
 BuildRequires: zip
@@ -18,12 +18,12 @@ BuildRequires: pkgconfig(libsystemd-daemon)
 %{?systemd_requires}
 
 %description
-Tizen security server and utilities
+Tizen security manager and utilities
 
 %package -n libsecurity-manager-client
 Summary:    Security manager (client)
 Group:      Security/Libraries
-Requires:   security-server = %{version}-%{release}
+Requires:   security-manager = %{version}-%{release}
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
@@ -63,14 +63,14 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 cp LICENSE %{buildroot}/usr/share/license/libsecurity-manager-client
 mkdir -p %{buildroot}/etc/security/
-cp security-server-audit.conf %{buildroot}/etc/security/
+cp security-manager-audit.conf %{buildroot}/etc/security/
 mkdir -p %{buildroot}/etc/smack/
 cp app-rules-template.smack %{buildroot}/etc/smack/
 %make_install
 
 mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
 mkdir -p %{buildroot}/usr/lib/systemd/system/sockets.target.wants
-ln -s ../security-server.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/security-server.service
+ln -s ../security-manager.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/security-manager.service
 ln -s ../security-manager-installer.socket %{buildroot}/usr/lib/systemd/system/sockets.target.wants/security-manager-installer.socket
 
 %clean
@@ -80,18 +80,18 @@ rm -rf %{buildroot}
 systemctl daemon-reload
 if [ $1 = 1 ]; then
     # installation
-    systemctl start security-server.service
+    systemctl start security-manager.service
 fi
 
 if [ $1 = 2 ]; then
     # update
-    systemctl restart security-server.service
+    systemctl restart security-manager.service
 fi
 
 %preun
 if [ $1 = 0 ]; then
     # unistall
-    systemctl stop security-server.service
+    systemctl stop security-manager.service
 fi
 
 %postun
@@ -104,21 +104,20 @@ fi
 
 %postun -n libsecurity-manager-client -p /sbin/ldconfig
 
-%files -n security-server
-%manifest security-server.manifest
+%files -n security-manager
+%manifest security-manager.manifest
 %defattr(-,root,root,-)
-%attr(755,root,root) /usr/bin/security-server
-%{_libdir}/libsecurity-server-commons.so.*
-%attr(-,root,root) /usr/lib/systemd/system/multi-user.target.wants/security-server.service
-%attr(-,root,root) /usr/lib/systemd/system/security-server.service
-%attr(-,root,root) /usr/lib/systemd/system/security-server.target
+%attr(755,root,root) /usr/bin/security-manager
+%{_libdir}/libsecurity-manager-commons.so.*
+%attr(-,root,root) /usr/lib/systemd/system/multi-user.target.wants/security-manager.service
+%attr(-,root,root) /usr/lib/systemd/system/security-manager.service
+%attr(-,root,root) /usr/lib/systemd/system/security-manager.target
 %attr(-,root,root) /usr/lib/systemd/system/sockets.target.wants/security-manager-installer.socket
 %attr(-,root,root) /usr/lib/systemd/system/security-manager-installer.socket
-%attr(-,root,root) /etc/security/security-server-audit.conf
+%attr(-,root,root) /etc/security/security-manager-audit.conf
 %attr(-,root,root) /etc/smack/app-rules-template.smack
 %{_datadir}/license/%{name}
 
-
 %files -n libsecurity-manager-client
 %manifest libsecurity-manager-client.manifest
 %defattr(-,root,root,-)
@@ -129,7 +128,7 @@ fi
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_libdir}/libsecurity-manager-client.so
-%{_libdir}/libsecurity-server-commons.so
+%{_libdir}/libsecurity-manager-commons.so
 %{_includedir}/security-manager/security-manager.h
 %{_includedir}/security-server/security-server.h
 %{_libdir}/pkgconfig/security-manager.pc
index f3fd02c..c1fc8ce 100644 (file)
@@ -1,4 +1,4 @@
-PKG_CHECK_MODULES(SECURITY_SERVER_DEP
+PKG_CHECK_MODULES(SECURITY_MANAGER_DEP
     dlog
     libsmack
     libprivilege-control
@@ -6,11 +6,11 @@ PKG_CHECK_MODULES(SECURITY_SERVER_DEP
     REQUIRED
     )
 
-SET(SECURITY_SERVER_PATH ${PROJECT_SOURCE_DIR}/src)
+SET(SECURITY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src)
 SET(SERVER2_PATH ${PROJECT_SOURCE_DIR}/src/server)
 
-SET(SECURITY_SERVER_SOURCES
-    ${SERVER2_PATH}/main/security-server-util.cpp
+SET(SECURITY_MANAGER_SOURCES
+    ${SERVER2_PATH}/main/security-manager-util.cpp
     ${SERVER2_PATH}/main/generic-socket-manager.cpp
     ${SERVER2_PATH}/main/socket-manager.cpp
     ${SERVER2_PATH}/main/server2-main.cpp
@@ -20,16 +20,16 @@ SET(SECURITY_SERVER_SOURCES
     )
 
 SET_SOURCE_FILES_PROPERTIES(
-    ${SECURITY_SERVER_SOURCES}
+    ${SECURITY_MANAGER_SOURCES}
     PROPERTIES
         COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
 
 INCLUDE_DIRECTORIES(SYSTEM
-    ${SECURITY_SERVER_DEP_INCLUDE_DIRS}
+    ${SECURITY_MANAGER_DEP_INCLUDE_DIRS}
     )
 
 INCLUDE_DIRECTORIES(
-    ${SECURITY_SERVER_PATH}/include
+    ${SECURITY_MANAGER_PATH}/include
     ${SERVER2_PATH}/main
     ${SERVER2_PATH}/common
     ${SERVER2_PATH}/service
@@ -37,10 +37,10 @@ INCLUDE_DIRECTORIES(
     ${SERVER2_PATH}/dpl/log/include
     )
 
-ADD_EXECUTABLE(${TARGET_SECURITY_SERVER} ${SECURITY_SERVER_SOURCES})
+ADD_EXECUTABLE(${TARGET_SECURITY_MANAGER} ${SECURITY_MANAGER_SOURCES})
 
-TARGET_LINK_LIBRARIES(${TARGET_SECURITY_SERVER}
-    ${SECURITY_SERVER_DEP_LIBRARIES}
+TARGET_LINK_LIBRARIES(${TARGET_SECURITY_MANAGER}
+    ${SECURITY_MANAGER_DEP_LIBRARIES}
     ${TARGET_SERVER_COMMON}
     -lcap
     )
@@ -74,7 +74,7 @@ SET_TARGET_PROPERTIES(
     )
 
 TARGET_LINK_LIBRARIES(${TARGET_SECURITY_MANAGER_CLIENT}
-    ${SECURITY_SERVER_DEP_LIBRARIES}
+    ${SECURITY_MANAGER_DEP_LIBRARIES}
     ${TARGET_SERVER_COMMON}
     )
 
@@ -82,15 +82,15 @@ TARGET_LINK_LIBRARIES(${TARGET_SECURITY_MANAGER_CLIENT}
 
 INSTALL(TARGETS ${TARGET_SECURITY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
 
-INSTALL(TARGETS ${TARGET_SECURITY_SERVER} DESTINATION bin)
+INSTALL(TARGETS ${TARGET_SECURITY_MANAGER} DESTINATION bin)
 
 INSTALL(FILES
-    ${SECURITY_SERVER_PATH}/include/security-server.h
+    ${SECURITY_MANAGER_PATH}/include/security-server.h
     DESTINATION  ${INCLUDE_INSTALL_DIR}/security-server
     )
 
 INSTALL(FILES
-    ${SECURITY_SERVER_PATH}/include/security-manager.h
+    ${SECURITY_MANAGER_PATH}/include/security-manager.h
     DESTINATION  ${INCLUDE_INSTALL_DIR}/security-manager
     )
 
index e33efbb..8960b51 100644 (file)
 namespace {
 
 const std::string AUDIT_CONFIG_LOG_PATH = "/etc/security/";
-const std::string AUDIT_CONFIG_FILENAME = "security-server-audit.conf";
+const std::string AUDIT_CONFIG_FILENAME = "security-manager-audit.conf";
 const std::string AUDIT_LOG_DIRECTORY = "/var/log/audit/";
 const std::string AUDIT_LOG_FILENAME_PREFIX = "audit-smack";
-const std::string AUDIT_LOG_SMACK_LABEL = "security-server::audit-files";
+const std::string AUDIT_LOG_SMACK_LABEL = "security-manager::audit-files";
 
 } // namespace anonymous
 
index 90f0713..ffe23da 100644 (file)
@@ -99,7 +99,7 @@ void DLOGLogProvider::Pedantic(const char *message,
                                int line,
                                const char *function)
 {
-    SLOG(LOG_DEBUG, "SecurityServer", "%s", FormatMessage(message,
+    SLOG(LOG_DEBUG, "SecurityManager", "%s", FormatMessage(message,
                                               filename,
                                               line,
                                               function).c_str());
similarity index 98%
rename from src/server/main/security-server-util.cpp
rename to src/server/main/security-manager-util.cpp
index d5363b9..b0febfa 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <limits>
 
-#include <security-server-util.h>
+#include <security-manager-util.h>
 #include <dpl/log/log.h>
 
 namespace {
index 92d98ad..9f594fa 100644 (file)
@@ -266,7 +266,7 @@ InstallerService::InstallerService()
 GenericSocketService::ServiceDescriptionVector InstallerService::GetServiceDescription()
 {
     return ServiceDescriptionVector {
-        {SERVICE_SOCKET_INSTALLER, "security-server::installer", INSTALLER_IFACE},
+        {SERVICE_SOCKET_INSTALLER, "security-manager::installer", INSTALLER_IFACE},
     };
 }
 
index a9b1ba9..b432ad4 100644 (file)
@@ -1,6 +1,6 @@
 INSTALL(FILES
-    ${CMAKE_SOURCE_DIR}/systemd/security-server.service
-    ${CMAKE_SOURCE_DIR}/systemd/security-server.target
+    ${CMAKE_SOURCE_DIR}/systemd/security-manager.service
+    ${CMAKE_SOURCE_DIR}/systemd/security-manager.target
     ${CMAKE_SOURCE_DIR}/systemd/security-manager-installer.socket
     DESTINATION
     /usr/lib/systemd/system
index 834a11f..e851c79 100644 (file)
@@ -5,11 +5,11 @@ SmackLabelIPIn=*
 SmackLabelIPOut=@
 
 # TODO: move to separate systemd service
-Service=security-server.service
+Service=security-manager.service
 
 [Unit]
-Wants=security-server.target
-Before=security-server.target
+Wants=security-manager.target
+Before=security-manager.target
 
 [Install]
 WantedBy=sockets.target
diff --git a/systemd/security-manager.service b/systemd/security-manager.service
new file mode 100644 (file)
index 0000000..e96e6fb
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Start the security manager
+
+[Service]
+Type=notify
+ExecStart=/usr/bin/security-manager
+
+Sockets=security-manager-installer.socket
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/security-manager.target b/systemd/security-manager.target
new file mode 100644 (file)
index 0000000..8586718
--- /dev/null
@@ -0,0 +1,4 @@
+[Unit]
+Description=security-manager sockets
+DefaultDependencies=true
+
diff --git a/systemd/security-server.service b/systemd/security-server.service
deleted file mode 100644 (file)
index 84d19c2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-[Unit]
-Description=Start the security server
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/security-server
-Sockets=security-server-data-share.socket
-Sockets=security-server-get-gid.socket
-Sockets=security-server-privilege-by-pid.socket
-Sockets=security-server-app-privilege-by-name.socket
-Sockets=security-server-cookie-get.socket
-Sockets=security-server-cookie-check.socket
-Sockets=security-server-password-check.socket
-Sockets=security-server-password-set.socket
-Sockets=security-server-password-reset.socket
-
-#TODO: move bellow to separate systemd service
-Sockets=security-manager-installer.socket
-
-[Install]
-WantedBy=multi-user.target
diff --git a/systemd/security-server.target b/systemd/security-server.target
deleted file mode 100644 (file)
index 9885544..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-[Unit]
-Description=security-server sockets
-DefaultDependencies=true
-