From: Lukasz Kostyra Date: Tue, 25 Jul 2017 13:35:03 +0000 (+0200) Subject: teec: Increase permission level for shared memory X-Git-Tag: submit/tizen/20170914.115510~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62d73ce4bec81d40b0431ec612fa1ad233040dc6;p=platform%2Fcore%2Fsecurity%2Ftef-simulator.git teec: Increase permission level for shared memory A temporary workaround to allow non-roots to create and access shared memory objects. Definitely should be removed in the future. Change-Id: I175b9ad5e265a9acb11542caa735512cd07b0c1b --- diff --git a/TEECLib/src/teec_api.c b/TEECLib/src/teec_api.c index 6b34a40..8505cd2 100644 --- a/TEECLib/src/teec_api.c +++ b/TEECLib/src/teec_api.c @@ -82,7 +82,8 @@ static int32_t initShm(char* path) { pthread_rwlock_wrlock(&file_create_lock); if (stat(path, &attr) == -1) { - fd = creat(path, S_IRWXU); + // FIXME increased permission level (was S_IRWXU only) + fd = creat(path, S_IRWXU | S_IRWXG | S_IRWXO); if (-1 == fd) { LOGE(TEEC_LIB, "shm file creation failed"); return -1;