{
int error;
- if ((error = security_server_request_cookie(buffer, length))
+ if ((error = security_server_request_cookie((char *)buffer, length))
== SECURITY_SERVER_API_SUCCESS)
{
cookie.assign(buffer, length);
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_common_LDFLAGS})
SET(EXPORT_HEADER
+ include/smartcard-types.h
include/Debug.h
include/Exception.h
include/ByteArray.h
{
public:
static int getPackageName(int pid, char *package, size_t length);
- static ByteArray getCertificationHash(const char *packageName);
- static ByteArray getCertificationHash(int pid);
+ static const ByteArray getCertificationHash(const char *packageName);
+ static const ByteArray getCertificationHash(int pid);
static bool getCertificationHashes(int pid, vector<ByteArray> &certHashes);
static bool getCertificationHashes(const char *packageName, vector<ByteArray> &certHashes);
};
Name: smartcard-service
Summary: Smartcard Service FW
-Version: 0.1.20
+Version: 0.1.22
Release: 0
Group: libs
License: Apache-2.0
#ifdef USE_AUTOSTART
if (resource->getClientCount() == 0)
{
- _DBG("There is no client. shutting down service");
+ _INFO("There is no client. shutting down service");
g_main_loop_quit((GMainLoop *)resource->getMainLoopInstance());
}
#endif
void ServerGDBus::deinit()
{
- deinitSEService();
- deinitReader();
- deinitSession();
deinitChannel();
+ deinitSession();
+ deinitReader();
+ deinitSEService();
_deinit();
_BEGIN();
buffer = IPCHelper::retrieveBuffer(socket);
- if (buffer.getLength() > 0)
+ if (buffer.size() > 0)
{
#ifdef SECURITY_SERVER
ByteArray cookie;
cookie.assign(buffer.getBuffer(), 20);
gid = security_server_get_gid("smartcard-daemon");
- if ((result = security_server_check_privilege(cookie.getBuffer(), gid)) != SECURITY_SERVER_API_SUCCESS)
+ if ((result = security_server_check_privilege((char *)cookie.getBuffer(), gid)) != SECURITY_SERVER_API_SUCCESS)
{
_ERR("security_server_check_privilege failed [%d]", result);
return msg;
}
bool ServerResource::_isAuthorizedAccess(ServerChannel *channel,
- const ByteArray aid, const vector<ByteArray> &hashes)
+ const ByteArray &aid, const vector<ByteArray> &hashes)
{
- bool result = true;
+ bool result = false;
AccessControlList *acList = NULL;
/* request open channel sequence */
/* standard library header */
#include <map>
#include <vector>
+#include <string>
#ifndef USE_GDBUS
#include <glib.h>
#endif
[D-BUS Service]
-Name=org.tizen.smartcard_service
+Name=org.tizen.SmartcardService
Exec=/usr/bin/smartcard-daemon
-User=root
\ No newline at end of file