summaryrefslogtreecommitdiff
path: root/source3/profile
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1999-12-13 13:27:58 +0000
committerAndrew Tridgell <tridge@samba.org>1999-12-13 13:27:58 +0000
commit3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7 (patch)
tree866dd15416c3d8554bb207709f433a87ad0c012d /source3/profile
parentf6276724bafdb6145c0c7b565172d80cb04516ea (diff)
downloadsamba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.tar.gz
samba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.tar.bz2
samba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.zip
first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
Diffstat (limited to 'source3/profile')
-rw-r--r--source3/profile/profile.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index b685b11916..72954f90c9 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -30,10 +30,6 @@
extern int DEBUGLEVEL;
-#define SHMEM_KEY ((key_t)0x07021999)
-#define SHM_MAGIC 0x6349985
-#define SHM_VERSION 1
-
#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))
static int shm_id;
@@ -52,13 +48,13 @@ BOOL profile_setup(BOOL rdonly)
again:
/* try to use an existing key */
- shm_id = shmget(SHMEM_KEY, 0, 0);
+ shm_id = shmget(PROF_SHMEM_KEY, 0, 0);
/* if that failed then create one. There is a race condition here
if we are running from inetd. Bad luck. */
if (shm_id == -1) {
if (read_only) return False;
- shm_id = shmget(SHMEM_KEY, sizeof(*profile_p),
+ shm_id = shmget(PROF_SHMEM_KEY, sizeof(*profile_p),
IPC_CREAT | IPC_EXCL | IPC_PERMS);
}
@@ -101,6 +97,8 @@ BOOL profile_setup(BOOL rdonly)
if (!read_only && (shm_ds.shm_nattch == 1)) {
memset((char *)profile_p, 0, sizeof(*profile_p));
+ profile_p->prof_shm_magic = PROF_SHM_MAGIC;
+ profile_p->prof_shm_version = PROF_SHM_VERSION;
DEBUG(3,("Initialised profile area\n"));
}