Samba uses SHM_R and SHM_W instead of the POSIX mode bit definitions S_IRUSR and S_IWUSR when calling shmget(3). There are compat defines for the former in include/includes.h, but it's arguably cleaner just to use the POSIX defs. I'll provide the (trivial) patch.
Created attachment 838 [details] posix-ipc.patch
Applied - thanks dude. I thought shared memory wasn't used anymore in Samba but I was obviously mistaken!
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.