SAMBA: a typo in source/locking/shmem_sysv.c
Dennis Vshivkov
walrus at amur.ru
Thu Oct 12 05:14:58 GMT 2000
Hello.
Searching through the source while exploring Samba locking subsystem, I
noticed a possible typo: while opening a semaphore in sysv_shm_open(), one of
return code checks tests a wrong id variable, instead of sem_id it checks
shm_id, which has not been messed with yet. Here is the patch:
diff -ur samba-2.0.7.old/source/locking/shmem_sysv.c samba-2.0.7/source/locking/shmem_sysv.c
--- samba-2.0.7.old/source/locking/shmem_sysv.c Wed Apr 26 09:06:55 2000
+++ samba-2.0.7/source/locking/shmem_sysv.c Thu Oct 12 14:54:43 2000
@@ -578,7 +578,7 @@
}
}
}
- if (shm_id == -1) {
+ if (sem_id == -1) {
sem_id = semget(SEMAPHORE_KEY, 0, 0);
}
if (sem_id == -1) {
Hope it helps.
--
/Awesome Walrus <walrus at amur.ru> [Uriel Zael] [Still Alive] [Evil Vugluskrs]
More information about the samba
mailing list