return;
}
- ret = snprintf(shm_name, sizeof(shm_name), SHM_NAME_TEMPLATE,
- sharedMem_imp->shmKey);
+ ret = snprintf(shm_name, sizeof(shm_name), SHM_NAME_TEMPLATE, sharedMem_imp->shmKey);
if (ret == sizeof(shm_name)) {
LOGE(TEE_STUB, "the shm object name is too long");
// Once the server is started, it exits only after the
// connection is lost or gracefully disconnected.
- StartServer(string(TEE_TASOCK_ROOT) + string(argv[1]));
+ std::string sock = string(TEE_TASOCK_ROOT) + argv[1];
+ LOGD(TEE_STUB, "StartServer on %s\n", sock.c_str());
+ StartServer(sock);
LOGD(TEE_STUB, "Exiting TEEStub\n");
// Deallocate property objects
if (TEE_SUCCESS == initStatus) DeInitPropertyModule();
//this is ln -s to /usr/lib/tastore or /usr/lib64/tastore (see spec file)
#define TEE_TASTORE_ROOT "/opt/tastore/"
+#define SIMDAEMON_SOCK_PATH "/tmp/simdaemon"
//TEEStub must have write access in this directory (creating socket per TA)
#define TEE_TASOCK_ROOT "/tmp/"
#define TEE_TALOG_ROOT "/tmp/"
#define SHM_PATH "/tmp/shm"
-#define SIMDAEMON_SOCK_PATH "/tmp/simdaemon"
#define TEE_PROP_PATH "/usr/bin/GPD_TEE_PROP"
+#define TEE_SS_ROOT "/tmp/tastore2/"
+
#endif /* INCLUDE_CONFIG_H_ */
+++ /dev/null
-/**
- * Copyright (c) 2015-2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file
- * @author CHERYL (cb) (cheryl.b@samsung.com)
- * @brief Path detail
- */
-
-
-#if !defined(_PATH_H)
-#define _PATH_H
-
-/*-----------------------------------------------------------------------------
- * MACROS
- *-----------------------------------------------------------------------------*/
-
-// shm path to be created for Shared memory functionality support
-#define SHM_PATH "/tmp/shm"
-// socket path for connection with Simulator Daemon
-#define SIMDAEMON_PATH "/tmp/simdaemon"
-
-#endif //_PATH_H
/*-----------------------------------------------------------------------------
* Include files
*-----------------------------------------------------------------------------*/
-#include "path.h"
#include "SimulatorDaemonServer.h"
-
#include <systemd/sd-daemon.h>
+#include <config.h>
/*-----------------------------------------------------------------------------
* Local functions
LOGD(SIM_DAEMON, "Entry");
uint32_t result = 0;
try {
- int sockFD = getSystemdSocket(SIMDAEMON_PATH);
+ int sockFD = getSystemdSocket(SIMDAEMON_SOCK_PATH);
//initializeShm();
if (sockFD > 0) {
startServer(ioService::getInstance());
} else {
LOGI(SIM_DAEMON, "No systemd socket available - creating own one");
- SimulatorDaemonServer s(ioService::getInstance(), SIMDAEMON_PATH);
+ SimulatorDaemonServer s(ioService::getInstance(), SIMDAEMON_SOCK_PATH);
startServer(ioService::getInstance());
}
* Include files
*-----------------------------------------------------------------------------*/
#include "TABinaryManager.h"
-#include <config.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <sys/file.h>
#include <algorithm>
#include <boost/filesystem.hpp>
+#include <config.h>
/*-----------------------------------------------------------------------------
* Globals
*-----------------------------------------------------------------------------*/
if (0 == unpacker->unpackTA(string(TEE_TASTORE_ROOT), uuid)) {
LOGD(SIM_DAEMON, "Unpacked, filling info");
// 1. Set binary info
- info.path = string(TEE_TASTORE_ROOT)+ uuid;
+ info.path = string(TEE_TASTORE_ROOT) + uuid;
info.extractpath = string(TEE_TASTORE_ROOT) + uuid + "-ext/";
info.imagePath = info.extractpath + uuid + ".image";
info.manifestPath = info.extractpath + uuid + ".manifest";
#include "TABinaryManager.h"
#include "TAManifest.h"
#include "TAUnpack.h"
-#include "Config.h"
+#include <config.h>
+
using namespace std;
int test_main() {
// Unpack TA
case 1: {
TAUnpack *unpacker = TAUnpack::getInstance();
- unpacker->unpackTA(TA_STORE_PATH, "0000-0000-0000-0000000000c7");
+ unpacker->unpackTA(TEE_TASTORE_ROOT, "0000-0000-0000-0000000000c7");
break;
}
// Manifest test
TAManifest manifest;
manifest.processXML(
string(
- TA_STORE_PATH"0000-0000-0000-0000000000c7-ext/0000-0000-0000-0000000000c7.manifest"));
+ TEE_TASTORE_ROOT"0000-0000-0000-0000000000c7-ext/0000-0000-0000-0000000000c7.manifest"));
manifest.printProcessedData();
break;
}
*-----------------------------------------------------------------------------*/
#include "TAInstance.h"
#include "ResponseCommands/ResMakeCommand.h"
+#include <config.h>
/*-----------------------------------------------------------------------------
* Member functions
char* ptr = data_name;
int remain = maxlen;
- strncpy(ptr, TEE_TASTORE_ROOT, remain);
+ strncpy(ptr, TEE_SS_ROOT, remain);
if (ptr[remain - 1] != '\0')
return -1;
ptr += strlen(ptr);
* MACROS
*-----------------------------------------------------------------------------*/
-
/*-----------------------------------------------------------------------------
* local functions
*-----------------------------------------------------------------------------*/