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>
############################# Check minimum CMake version #####################
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT("security-server")
+PROJECT("security-manager")
############################# cmake packages ##################################
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)
-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
%{?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
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
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
%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,-)
%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
-PKG_CHECK_MODULES(SECURITY_SERVER_DEP
+PKG_CHECK_MODULES(SECURITY_MANAGER_DEP
dlog
libsmack
libprivilege-control
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
)
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
${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
)
)
TARGET_LINK_LIBRARIES(${TARGET_SECURITY_MANAGER_CLIENT}
- ${SECURITY_SERVER_DEP_LIBRARIES}
+ ${SECURITY_MANAGER_DEP_LIBRARIES}
${TARGET_SERVER_COMMON}
)
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
)
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
int line,
const char *function)
{
- SLOG(LOG_DEBUG, "SecurityServer", "%s", FormatMessage(message,
+ SLOG(LOG_DEBUG, "SecurityManager", "%s", FormatMessage(message,
filename,
line,
function).c_str());
#include <limits>
-#include <security-server-util.h>
+#include <security-manager-util.h>
#include <dpl/log/log.h>
namespace {
GenericSocketService::ServiceDescriptionVector InstallerService::GetServiceDescription()
{
return ServiceDescriptionVector {
- {SERVICE_SOCKET_INSTALLER, "security-server::installer", INSTALLER_IFACE},
+ {SERVICE_SOCKET_INSTALLER, "security-manager::installer", INSTALLER_IFACE},
};
}
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
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
--- /dev/null
+[Unit]
+Description=Start the security manager
+
+[Service]
+Type=notify
+ExecStart=/usr/bin/security-manager
+
+Sockets=security-manager-installer.socket
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+[Unit]
+Description=security-manager sockets
+DefaultDependencies=true
+
+++ /dev/null
-[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
+++ /dev/null
-[Unit]
-Description=security-server sockets
-DefaultDependencies=true
-