semaphores and Solaris 7 8/99
David Collier-Brown
davecb at canada.sun.com
Mon Oct 25 15:07:52 GMT 1999
Dumb question time #32767 (;-))
In locking/shmem_sysv.c, Samba uses 0x280267 + 2 as a semaphore id,
amd passes it to semget.
The same constant shows up elsewhere in Samba, thusly:
File Line
1 shmem_sysv.c 30 #define SHMEM_KEY ((key_t)0x280267)
2 connection.c 196 crec.magic = 0x280267;
3 status.c 250 if ( crec.magic == 0x280267 &&
process_exists(crec.pid)
4 statuspage.c 133 if (crec.magic == 0x280267 && crec.cnum == -1 &&
5 statuspage.c 212 if (crec.magic == 0x280267 &&
6 statuspage.c 239 if (crec.magic == 0x280267 &&
process_exists(crec.pid))
In Solaris 7 and on at least two sites, this has resulted in
a semaphore which doesn't belong to the expected user (root).
While I look at the actual behavior, and changes in Solaris which
might make it undesirable, can anyone comment on the origin of the
constant? Is this just a "signature" for a samba-created semaphore /
shared memory segment / connection record?
--dave
--
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | http://java.science.yorku.ca/~davecb
Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical
mailing list