Age | Commit message (Collapse) | Author |
|
unconnected socket; reported by Christian Biere <christianbiere at gmx dot de>
ok claudio@ deraadt@
|
|
|
|
so check fp before dereferencing it; fixes a crash found by hshoexer@
with input from art@, art@ millert@ deraadt@ ok.
|
|
|
|
encapsulating all such access into wall-defined functions
that makes sure locking is done as needed.
It also cleans up some uses of wall time vs. uptime some
places, but there is sure to be more of these needed as
well, particularily in MD code. Also, many current calls
to microtime() should probably be changed to getmicrotime(),
or to the {,get}microuptime() versions.
ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others
"Oh, that is not your problem!" from miod@
|
|
|
|
testing for quite some time by brad + otto
|
|
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
|
|
|
|
Some parts from NetBSD, but with big modifications.
|
|
the same semantics as NetBSD anyway, so it's good to avoid name collissions.
- Always fdremove before freeing the file, not the other way around.
- falloc FREFs the file.
- have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to
falloc FREFing the file).
- Use closef as much as possible instead of ffree in error paths of
falloc:ing functions. closef is much more careful with the fd and can
deal with the fd being forcibly closed by dup2. Also try to avoid
manually calling *fo_close when closef can do that for us (this makes
some error paths mroe complicated (sys_socketpair and sys_pipe), but
others become simpler (sys_open)).
|
|
from fd tables and other long-lived objects). This is to avoid races between
using a file descriptor and having another process (with shared fd table)
close it. We use a separate refence count so that error values from close(2)
will be correctly returned to the caller of close(2).
The macros for those reference counts are FILE_USE(fp) and FILE_UNUSE(fp).
Make sure that the cases where closef can be called "incorrectly" (most notably
dup2(2)) are handled.
Right now only callers of closef (and {,p}read) use FILE_{,UN}USE correctly,
more fixes incoming soon.
|
|
|
|
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
|
|
would have to grow the table and fdexpand that grows the table. Since
fdexpand can sleep we have to restart all operations if we have to call
it.
- dup2 changed so that finishdup frees the destination descriptor.
- unp_externalize is a completly rewritten version from NetBSD.
Changes mostly inspired by NetBSD.
|
|
client credentials. mostly from superscript.com. deraadt@ ok
|
|
|
|
names more carefully; art
|
|
|
|
empty for unp_gc() in case of cross referenced sockets. part by millert
|
|
socket, fill the socket's creation time into the stat structure's st_[acm]time
fields: POSIX requires this behavior for pipe(2). N.B.: updating the
st_[am]time fields when reading/writing the pipe is neither required nor
implemented, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|