summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-05 09:48:40 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2011-11-05 09:48:40 +0100
commit4dce943dca5f9f9f49287819504c15ded49e7fc8 (patch)
tree0e63853a57c8e56690ad360ea5f857c79060e230 /src
parent2bdce36ecbae3ff709a8c698fb5264d358444246 (diff)
downloadDLT-daemon-4dce943dca5f9f9f49287819504c15ded49e7fc8.tar.gz
Fixed semaphore access problem when dlt-daemon started as root.
Diffstat (limited to 'src')
-rw-r--r--src/shared/dlt_shm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/dlt_shm.c b/src/shared/dlt_shm.c
index 9d33fe6..2eecafe 100644
--- a/src/shared/dlt_shm.c
+++ b/src/shared/dlt_shm.c
@@ -132,8 +132,8 @@ int dlt_shm_init_server(DltShm *buf,int key,int size) {
}
// Init semaphore
- if( (buf->semid = semget(DLT_SHM_SEM,1,S_IRWXU|S_IRWXG|IPC_CREAT|IPC_EXCL)) == -1 ) {
- if( (buf->semid = semget(DLT_SHM_SEM,1,S_IRWXU|S_IRWXG|IPC_EXCL)) == -1 ) {
+ if( (buf->semid = semget(DLT_SHM_SEM,1,S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT|IPC_EXCL)) == -1 ) {
+ if( (buf->semid = semget(DLT_SHM_SEM,1,S_IRWXU|S_IRWXG|S_IRWXO|IPC_EXCL)) == -1 ) {
perror("SHM: semget");
return -1; /* ERROR */
}