summaryrefslogtreecommitdiff
path: root/source/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
commitbc1385fc5e55eeed626615fad92877296064a27e (patch)
tree4ddc16fd3c0bad027e721d898fe9dd2a35ce93e4 /source/profile
parentd47016de52e9e5c468edf4c87dc60535a9796b99 (diff)
downloadsamba-bc1385fc5e55eeed626615fad92877296064a27e.tar.gz
Restore the profiling data shmem parinoia. This whole area needs to be
fixed - an mmaped file or the like would be a good idea.
Diffstat (limited to 'source/profile')
-rw-r--r--source/profile/profile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/profile/profile.c b/source/profile/profile.c
index 430732c6f86..5ddc72c490c 100644
--- a/source/profile/profile.c
+++ b/source/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",