r4268: Merge fix for bugzilla #2150.
authorTim Potter <tpot@samba.org>
Sun, 19 Dec 2004 00:31:31 +0000 (00:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:41 +0000 (10:53 -0500)
(This used to be commit f00ae4ab0c36a623257861fb65373b39cf075921)

source3/include/includes.h
source3/profile/profile.c
source3/torture/torture.c

index ef0f761ff7df7bb626ecf4b3c0a2278d09e297d4..66ff4fa9f02e2dd9e024525252e6fdf62158b76e 100644 (file)
@@ -1202,15 +1202,6 @@ int vasprintf(char **ptr, const char *format, va_list ap);
 #define LOG_DEBUG       7       /* debug-level messages */
 #endif
 
-/* NetBSD doesn't have these */
-#ifndef SHM_R
-#define SHM_R 0400
-#endif
-
-#ifndef SHM_W
-#define SHM_W 0200
-#endif
-
 #if HAVE_KERNEL_SHARE_MODES
 #ifndef LOCK_MAND 
 #define LOCK_MAND      32      /* This is a mandatory flock */
index 689f67da997d558208da04afabe3011440c535d5..e6d34e68cda7fcf3201f0b94086aad92bfa46cf1 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 
 #ifdef WITH_PROFILE
-#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))
+#define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH)
 #endif /* WITH_PROFILE */
 
 #ifdef WITH_PROFILE
index 91732d69735e9e3ab90b5fabd1580cf8d175431b..72a391dbdbb3317e1084ad558f8d899e9acbf208 100644 (file)
@@ -70,7 +70,7 @@ void *shm_setup(int size)
        int shmid;
        void *ret;
 
-       shmid = shmget(IPC_PRIVATE, size, SHM_R | SHM_W);
+       shmid = shmget(IPC_PRIVATE, size, S_IRUSR | S_IWUSR);
        if (shmid == -1) {
                printf("can't get shared memory\n");
                exit(1);