1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
freebsd/sys/svr4
Alfred Perlstein c636255150 fix races in the uidinfo subsystem, several problems existed:
1) while allocating a uidinfo struct malloc is called with M_WAITOK,
   it's possible that while asleep another process by the same user
   could have woken up earlier and inserted an entry into the uid
   hash table.  Having redundant entries causes inconsistancies that
   we can't handle.

   fix: do a non-waiting malloc, and if that fails then do a blocking
   malloc, after waking up check that no one else has inserted an entry
   for us already.

2) Because many checks for sbsize were done as "test then set" in a non
   atomic manner it was possible to exceed the limits put up via races.

   fix: instead of querying the count then setting, we just attempt to
   set the count and leave it up to the function to return success or
   failure.

3) The uidinfo code was inlining and repeating, lookups and insertions
   and deletions needed to be in their own functions for clarity.

Reviewed by: green
2000-06-22 22:27:16 +00:00
..
imgact_svr4.c
Makefile Don't forget to back up svr4_syscallnames.c. Don't depend on side effects 2000-05-09 21:40:01 +00:00
svr4_acl.h
svr4_dirent.h
svr4_errno.h
svr4_exec.h
svr4_fcntl.c Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00
svr4_fcntl.h
svr4_filio.c Remove some all-too-wordy debugging prints 2000-01-15 15:30:44 +00:00
svr4_filio.h
svr4_fuser.h
svr4_hrt.h
svr4_ioctl.c Remove unnecessary includes 1999-12-08 12:01:59 +00:00
svr4_ioctl.h
svr4_ipc.c Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00
svr4_ipc.h
svr4_misc.c fix races in the uidinfo subsystem, several problems existed: 2000-06-22 22:27:16 +00:00
svr4_mman.h
svr4_proto.h Regenerated (to fix "created from" lines, and to fix the previous 2000-05-10 14:38:28 +00:00
svr4_resource.c SVR4 emulator source files now take their compilation options from 1999-12-08 10:51:17 +00:00
svr4_resource.h
svr4_siginfo.h
svr4_signal.c Fix handling of svr4_sigsets, which are implemented in SysVR4 as a sequence 2000-01-15 15:38:17 +00:00
svr4_signal.h Fix handling of svr4_sigsets, which are implemented in SysVR4 as a sequence 2000-01-15 15:38:17 +00:00
svr4_socket.c Back out the previous change to the queue(3) interface. 2000-05-26 02:09:24 +00:00
svr4_socket.h
svr4_sockio.c Remove unnecessary includes 1999-12-08 12:01:59 +00:00
svr4_sockio.h
svr4_sockmod.h
svr4_stat.c Remove unnecessary includes 1999-12-08 12:01:59 +00:00
svr4_stat.h
svr4_statvfs.h
svr4_stream.c Remove unneeded <sys/buf.h> includes. 2000-04-18 15:15:39 +00:00
svr4_stropts.h
svr4_syscall.h Regenerated (to fix "created from" lines, and to fix the previous 2000-05-10 14:38:28 +00:00
svr4_syscallnames.c Regenerated (to fix "created from" lines, and to fix the previous 2000-05-10 14:38:28 +00:00
svr4_sysconfig.h
svr4_sysent.c Regenerated (to fix "created from" lines, and to fix the previous 2000-05-10 14:38:28 +00:00
svr4_systeminfo.h
svr4_sysvec.c Give the "streams" modulea version (1) and depend on it from the 2000-05-06 01:39:45 +00:00
svr4_termios.c Remove unnecessary includes 1999-12-08 12:01:59 +00:00
svr4_termios.h
svr4_time.h
svr4_timod.h
svr4_ttold.c Remove unnecessary includes 1999-12-08 12:01:59 +00:00
svr4_ttold.h
svr4_types.h
svr4_ucontext.h
svr4_ulimit.h
svr4_ustat.h
svr4_util.h
svr4_utsname.h
svr4_wait.h
svr4.h Removed bogus include of opt_global.h. opt_global.h is automatically 2000-01-09 12:29:45 +00:00
syscalls.conf
syscalls.master Fixed the "created from" lines generated from this file. makesyscalls.sh 2000-05-10 14:32:32 +00:00