summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis.wu <43311482+wubo009@users.noreply.github.com>2020-04-20 09:14:59 +0800
committerGitHub <noreply@github.com>2020-04-20 09:14:59 +0800
commitdc871dec4c09720e5fc1c08ddf010f9ac983a101 (patch)
tree632fe8bf6ca21e77584e9d157cb78b8c0fa0f04c
parentc0d3969b12c97f324c701b773bcabac9ec01d8b1 (diff)
parent22d94e9e46b46bcc0075ae1846e91e9f72853562 (diff)
downloadopen-iscsi-dc871dec4c09720e5fc1c08ddf010f9ac983a101.tar.gz
Merge pull request #1 from wubo009/wubo009
log:modify iSCSI shared memory permissions for logs
-rw-r--r--usr/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/log.c b/usr/log.c
index 6e16e7c..2fc1850 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -73,7 +73,7 @@ static int logarea_init (int size)
logdbg(stderr,"enter logarea_init\n");
if ((shmid = shmget(IPC_PRIVATE, sizeof(struct logarea),
- 0644 | IPC_CREAT | IPC_EXCL)) == -1) {
+ 0600 | IPC_CREAT | IPC_EXCL)) == -1) {
syslog(LOG_ERR, "shmget logarea failed %d", errno);
return 1;
}
@@ -93,7 +93,7 @@ static int logarea_init (int size)
size = DEFAULT_AREA_SIZE;
if ((shmid = shmget(IPC_PRIVATE, size,
- 0644 | IPC_CREAT | IPC_EXCL)) == -1) {
+ 0600 | IPC_CREAT | IPC_EXCL)) == -1) {
syslog(LOG_ERR, "shmget msg failed %d", errno);
free_logarea();
return 1;
@@ -114,7 +114,7 @@ static int logarea_init (int size)
la->tail = la->start;
if ((shmid = shmget(IPC_PRIVATE, MAX_MSG_SIZE + sizeof(struct logmsg),
- 0644 | IPC_CREAT | IPC_EXCL)) == -1) {
+ 0600 | IPC_CREAT | IPC_EXCL)) == -1) {
syslog(LOG_ERR, "shmget logmsg failed %d", errno);
free_logarea();
return 1;