| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
strict than anticipated. It allows a programmer to pledge/promise/covenant
that their program will operate within an easily defined subset of the
Unix environment, or it pays the price.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
{Free,Net}BSD
- when a socket is closed with fds in its input, defer closing them to
a task to avoid recursing. This eliminates the complicated extra
reference taking which had a 37 line(!) comment explanation
- move flags, counts, and links only needed for this from struct file to
struct unpcb
- document the flow of the mark/sweep collector
much help from claudio@ who made me explain the GC to him until we trusted it
ok claudio@ mpi@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pathlist is a whitelist of dirs and files; anything else returns ENOENT.
Recommendation is to use a narrowly defined list. Also add TAME_FATTR, which
permits explicit change operations against "struct stat" fields. Some
other TAME_ flags are refined slightly.
Not cranking libc now, since nothing commited in base uses this and the
timing is uncomfortable for others. Discussed with many; thanks for a
few bug fixes from semarie, doug, guenther.
ok guenther
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tests reported an EMSGSIZE error although the sent message was not
too large. The way backpressure was implemented for unix domain
sockets confused the check in sosend().
Unix domain sockets append data only to the recv buffer. To report
the amount of content to the sender, the high watermark of the send
buffer was reduced. This happend for SOCK_STREAM and SOCK_SEQPACKET.
Sosend checks wether atomic chunks could ever fit into the send
buffer which is limited by the high watermark. This happens for
SOCK_DGRAM and SOCK_SEQPACKET. For SOCK_SEQPACKET the combination
of these mechanisms resulted in an EMSGSIZE error when the buffer
got filled. This also happened when space could be created by
reading from the other end in contradiction to the semantics of
EMSGSIZE.
Do not emulate a send buffer that has no space. It is better to
fill the buffer with fake data than to reduce its size. Thus the
high watermark always contains the real value. When disconnecting,
reset the counters. Otherwise the socket layer would try to flush
non existing data in the send buffer.
Tested by jeremy@ with a C program and the ruby tests.
OK markus@ jeremy@
|
|
|
|
|
|
|
|
| |
and a count instead of calling the callback on each one, while also renders
the 'dispose' argument superfluous.
Move unp_*() prototypes from <sys/un.h> to <sys/unpcb.h>
ok claudio@ mpi@
|
|
|
|
|
|
|
|
| |
compatibility with 4.3BSD in September 1989.
*Pick your own definition for "temporary".
ok bluhm@, claudio@, dlg@
|
|
|
|
|
| |
a SLIST.
OK mpi@ benno@
|
| |
|
|
|
|
| |
ok doug tedu
|
|
|
|
|
|
|
| |
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC,
SOCK_CLOEXEC. Includes SOCK_NONBLOCK support.
ok matthew@
|
| |
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
pr->ps_mainproc->p_pid to get the PID.
ok matthew@
|
|
|
|
|
|
|
| |
leaking values in the padding bytes on LP64. Also, vn_stat() was lacking
the zero-fill to clean its padding.
ok kettenis@ deraadt@ phessler@
|
| |
|
|
|
|
|
|
| |
leaving us with a free type function that isn't atomic. deal with this
by erasing any reachable pointers to the vnode first, then free it.
ok deraadt guenther
|
|
|
|
|
|
|
|
| |
get{sock,peer}name() behave like accept() when the involved UNIX-domain
socket isn't bound to an address, returning an AF_UNIX sockaddr
with zero-length sun_path. Based on diff from robert@ and mikeb@
ok robert@ deraadt@
|
|
|
|
|
| |
pointer array; we can access it directly.
ok guenther
|
|
|
|
|
|
| |
shared between processes.
ok djm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Require sun_family to be set to AF_UNIX (also in unp_connect())
- Ensure internal sockaddr_un's always have their length set to
sizeof(struct sockaddr_un) regardless of the user specified length,
implicitly extending with NUL characters as necessary.
- Normalize sun_path to never contain a non-NUL character after a
NUL character.
Lack of NUL termination on truncated sockaddrs issue pointed out by
Michael Kerrisk on the Austin Group mailing list.
ok millert
|
|
|
|
| |
ok deraadt, miod, guenther
|
|
|
|
|
|
| |
that leaks all the file pointers. Instead make sure that the exit path via
restart: -> out: does not free the uninitialized pointer.
OK deraadt@ guenther@
|
| |
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
|
| |
valid after that. Copy the data into a temp buffer and then copy it back
into the shiny new cluster. Problem found by deraadt@. Ok deraadt@
|
| |
|
|
|
|
|
| |
losing them.
ok claudio
|
| |
|
|
|
|
|
|
| |
during CMSG_DATA SCM_RIGHTS fd transfers. If this is exceeded,
return EMFILE.
ok claudio guenther gilles
|
|
|
|
| |
ok claudio@
|
|
|
|
|
|
| |
that *some* char in sun_path is NUL, not necessarily the last.
ok claudio@ tedu@
|
|
|
|
|
| |
and that it is nul terminated. This means the longest path is now 103
char longs. With and OK guenther@
|
|
|
|
|
|
|
|
| |
move those flags to f_iflags; This makes rooms in the
flag member of struct file for some goodies matthew@
as planned.
ok matthew@, deraadt@.
|
|
|
|
|
|
|
| |
they're tightly bound to struct filedesc, leading to NULL derefs
during exit1().
ok henning@, millert@, kettenis@
|
|
|
|
|
| |
can go away
ok guenther
|
|
|
|
|
|
| |
so that we remember to remove it all at the same time in two years.
ok deraadt@
|
| |
|
|
|
|
| |
thread. Discussion with guenther.
|
|
|
|
|
|
|
| |
getpeereid(2), but also supplies the remote pid. This is supplied in
a 'struct sockpeercred' (unlike Linux -- they showed how little they
know about real unix by calling theirs 'struct ucred').
ok guenther ajacoutot
|
|
|
|
| |
the receiving side when passing fd's. ok deraadt@ kettenis@
|
|
|
|
|
|
|
|
| |
POSIX 1003.1-2008, with compatibility macros for the names used in
previous version of OpenBSD. Update all the references in the
kernel to use the new, standard member names.
ok'ed by miod@, otto@; ports build test by naddy@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get hung in nfs_reconnect() because they do not have the proper
privilages to bind to a socket, by adding a struct proc * argument
to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind)
and do the sobind() with proc0 in nfs_connect.
OK markus@, blambert@.
"go ahead" deraadt@.
Fixes an issue reported by bernd@ (Tested by bernd@).
Fixes PR5135 too.
|
| |
|
|
|
|
|
|
| |
and with exactly the right amount of padding.
diff actually typed in by deraadt@
|
| |
|
|
|
|
|
| |
dir-outside-chroot-directory into a chroot jail
ok markus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
msg_controllen should be CMSG_LEN() instead of CMSG_SPACE() because
the kernel fd passing code was erroring out when
"cm->cmsg_len != control->m_len"
instead of
"CMSG_ALIGN(cm->cmsg_len) != control->m_len".
On machines with 16-byte alignment, when one thinks about how the ALIGN
padding happens, it is clear that msg_controllen has to be CMSG_SPACE()
or the kernel cannot hope to bounds check the messages correctly.
For now, change the check to cm->cmsg_len > control->m_len to permit the
old ABI to continue working. Later perhaps when all the old binaries
are gone we can stop permitting their use.
lots of discussion with kettenis
|