summaryrefslogtreecommitdiff
path: root/source3/profile
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-09-15 02:10:22 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-09-15 02:10:22 +0000
commit9a846daf441c3d82e4fc750382fd12fcb8fb9a6d (patch)
treea214adcd12a6ee0ffbf55034557642f6caa3b153 /source3/profile
parent1c8c7c558b563e9a3bd0a11e9bc11947f99d700a (diff)
downloadsamba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.tar.gz
samba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.tar.bz2
samba-9a846daf441c3d82e4fc750382fd12fcb8fb9a6d.zip
Restore the profiling data shmem parinoia. This whole area needs to be
fixed - an mmaped file or the like would be a good idea. (This used to be commit bc1385fc5e55eeed626615fad92877296064a27e)
Diffstat (limited to 'source3/profile')
-rw-r--r--source3/profile/profile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index 430732c6f8..5ddc72c490 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -130,12 +130,10 @@ BOOL profile_setup(BOOL rdonly)
return False;
}
-#if 0
- if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid != 0) {
- DEBUG(0,("ERROR: root did not create the shmem\n"));
+ if (shm_ds.shm_perm.cuid != sec_initial_uid() || shm_ds.shm_perm.cgid != sec_initial_gid()) {
+ DEBUG(0,("ERROR: we did not create the shmem (owned by another user)\n"));
return False;
}
-#endif
if (shm_ds.shm_segsz != sizeof(*profile_h)) {
DEBUG(0,("WARNING: profile size is %d (expected %d). Deleting\n",