SET(CMAKE_VERBOSE_MAKEFILE OFF)
-# apply smack
-ADD_DEFINITIONS("-DUSER_SPACE_SMACK")
-
IF(DEFINED USE_AUTOSTART)
ADD_DEFINITIONS("-DUSE_AUTOSTART")
ENDIF()
BuildRequires: cmake
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
-BuildRequires: pkgconfig(security-server)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(libssl)
# pkg config
INCLUDE(FindPkgConfig)
-SET(PKG_MODULE glib-2.0 gio-2.0 gio-unix-2.0 security-server dlog)
+SET(PKG_MODULE glib-2.0 gio-2.0 gio-unix-2.0 dlog)
pkg_check_modules(pkgs_server REQUIRED ${PKG_MODULE})
#include <string>
#include <sys/socket.h>
-/* SLP library header */
-#ifdef USER_SPACE_SMACK
-#include "security-server.h"
-#endif
-
/* local header */
#include "smartcard-types.h"
#include "Debug.h"
const char *rights)
{
bool result = true;
-#ifdef USER_SPACE_SMACK
- pid_t pid;
- const char *name;
- ClientInstance *instance;
-
- name = g_dbus_method_invocation_get_sender(invocation);
- instance = ServerResource::getInstance().getClient(name);
- if (instance != NULL) {
- pid = instance->getPID();
- } else {
- pid = ServerGDBus::getInstance().getPID(name);
- }
-
- result = (security_server_check_privilege_by_pid(
- pid,
- "smartcard-service",
- rights) == SECURITY_SERVER_API_SUCCESS);
-#endif
return result;
}
#include <gio/gio.h>
#include <map>
-/* SLP library header */
-#ifdef USER_SPACE_SMACK
-#include "security-server.h"
-#endif
-
/* local header */
#include "Debug.h"
#include "APDUHelper.h"
const char *rights)
{
bool result = true;
-#ifdef USER_SPACE_SMACK
- pid_t pid;
- const char *name;
-
- name = g_dbus_method_invocation_get_sender(invocation);
-
- pid = ServerGDBus::getInstance().getPID(name);
- result = (security_server_check_privilege_by_pid(
- pid,
- "smartcard-service::priv",
- rights) == SECURITY_SERVER_API_SUCCESS);
-#endif
return result;
}