summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove p arg from fdplocktedu2004-07-221-5/+5
|
* make sockargs take void *, combine a len check.tedu2004-04-121-13/+7
| | | | from pedro martelletto, ok markus@
* use NULL for ptrs. parts from Joris Vinktedu2004-04-011-3/+3
|
* lock filedesc before manipulating. avoids some rare races.tedu2004-01-061-3/+15
| | | | testing for quite some time by brad + otto
* match syscallargs comments with realityhenning2003-09-011-11/+11
| | | | | from Patrick Latifi <patrick.l@hermes.usherb.ca> ok jason@ tedu@
* remove caddr_t casts. it's just silly to cast something when the functiontedu2003-07-211-30/+25
| | | | takes a void *. convert uiomove to take a void * as well. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Just like getvnode, make getsock FREF the file so that we can't get awayart2002-08-231-29/+30
| | | | | | | with not refing it. Eyeballed by lurene@daemonkitty.net, fries@, nordin@ and fries@ Some additional cleanups by nordin@
* In sys_accept don't FILE_SET_MATURE the file if we got an error and we've freed it.art2002-05-231-2/+3
| | | | | | | | | Noticed by enami@netbsd in a recent discussion on tech-kern@netbsd. Thanks to miod@ for helping me understand my code and realize that what the discussion was originally about (a diff by itojun@) didn't apply to us because I tweaked the semantics of closef() to solve the problem automagically for us (and I forgot about it). miod@ ok.
* Fix my total blackout of the brain.art2002-02-121-3/+2
| | | | | | | | I rearrange half of this function to properly handle unlocking in one error case, then I forget to handle that error case. I even had a regression test written for this! In other words: fix accept(2) to unlock when it runs out of fds.
* Fix all users of getsock to use FREF/FRELE properly.art2002-02-121-62/+99
|
* In {send,recv}msg allow zero sized message. We can have control data.art2002-02-111-8/+10
|
* - Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't haveart2002-02-081-10/+15
| | | | | | | | | | | | | | 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)).
* makes a new accept() socket have the nonblock behavior.fgsch2001-12-271-2/+6
| | | | | slightly modified version from the original diff by theo, based on comments by niels@ and deraadt@; both ok'ed.
* release the right descriptors when pipe fails; bug report fromprovos2001-12-021-7/+4
| | | | marcodsl@swbell.net
* avoid "thundering herd" problem in accept by waking just one process.provos2001-11-281-19/+36
| | | | based on freebsd. okay art@ markus@
* change socket connection queues to use TAILQ_provos2001-11-271-2/+2
| | | | | | | | from NetBSD: Wed Jan 7 23:47:08 1998 UTC by thorpej Make insertion and removal of sockets from the partial and incoming connections queues O(C) rather than O(N).
* - every new fd created by falloc() is marked as larval and should not be usedart2001-10-261-3/+6
| | | | | | | 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.
* occured->occurredmpech2001-09-201-2/+2
| | | | | idea from deraadt@ via NetBSD millert@ ok
* Don't treated return length of recvfrom() as a size_t... it's a socklen_t.jason2001-09-171-10/+12
|
* implement djb's getpeereid(2), to allow local-domain servers to determine client credentials. mostly from superscript.com. deraadt@ okdugsong2001-06-261-1/+47
|
* KNFderaadt2001-06-221-15/+14
|
* No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)ho2001-05-161-14/+5
|
* gc OLD_PIPE.art2001-05-141-50/+1
|
* Indentation nit.art2001-02-191-2/+2
|
* return error from soaccept() upwards. part of accept(2) fix against RSTitojun2001-02-091-3/+8
| | | | right after handshake.
* support kernel event queues, from FreeBSD by Jonathan Lemon,provos2000-11-161-1/+7
| | | | okay art@, millert@
* Change the ktrace interface functions from taking the trace vnode to taking theart2000-11-101-4/+3
| | | | traced proc. The vnode is in the proc and all functions need the proc.
* allow buflen > MLEN for !SO_NAME case (like ancillary data, necessary foritojun2000-10-121-10/+17
| | | | | IPv6 advanced API). sync with netbsd.
* replace MALLOC/FREE w/ malloc/free for non-constant-sized memory allocations; art@ okmickey2000-09-271-11/+11
|
* oops, another syscall pipe() botch; karls@inet.noderaadt2000-01-171-2/+2
|
* bring in KAME IPv6 code, dated 19991208.itojun1999-12-081-8/+28
| | | | | | | | | replaces NRL IPv6 layer. reuses NRL pcb layer. no IPsec-on-v6 support. see sys/netinet6/{TODO,IMPLEMENTATION} for more details. GENERIC configuration should work fine as before. GENERIC.v6 works fine as well, but you'll need KAME userland tools to play with IPv6 (will be bringed into soon).
* introduce fdremove() to mark a file descriptor as unused. fdremove makesprovos1999-07-131-6/+6
| | | | | sure that the fd_freefile hints stay in sync, otherwise free file descriptors might not be overlooked by fdalloc(); ok millert@
* do not mangle retval, makes return value sane; problem found by millertderaadt1999-06-151-6/+6
|
* oopsprovos1999-06-111-2/+2
|
* copy int sized objects, not register_t sized objects in pipe()deraadt1999-06-081-2/+5
|
* better fd leak preventionderaadt1999-06-081-11/+5
|
* need seperate sys_pipe() versions, for pipeclose() or soclose() callsderaadt1999-06-071-2/+6
|
* replacement pipe() system call; copies data into place inside kernel, soderaadt1999-06-071-2/+28
| | | | that EFAULT return value is possible
* do not leak file descriptors if copyout() failsderaadt1999-06-071-2/+3
|
* store NULL in fd_ofilesderaadt1999-06-071-6/+6
|
* sendto(2) takes a socklen_t as wellmillert1999-02-151-2/+2
|
* use socklen_tmillert1999-02-151-37/+32
|
* Use IOV_MAX, not the deprecated UIO_MAXIOVmillert1999-02-141-3/+3
|
* Don't do range checking on namelen unless name is non-NULL, otherwisemillert1999-02-141-6/+8
| | | | namelen is uninitialized.
* readv/writev with iov_len == 0 is legal (was already ok in uipc_syscalls.c).millert1999-02-141-5/+5
| | | | | | | Make the check more readable by comparing against SSIZE_MAX instead of checking for wraparound. This is safe because SSIZE_MAX * 2 <= SIZE_T_MAX. Fixes recno problems in the db routines exposed by a perl test.
* avoid insane lengths for various syscallsderaadt1999-02-111-5/+13
|
* allow the recvfrom (fd, NULL, 0, MSG_PEEK, ...) again, pr 584.provos1998-09-141-3/+5
|
* return EMSGSIZE, not EINVAL is msg_iovlen <= 0 as per XPG 4.2millert1998-08-051-13/+9
| | | | When comparing against UIO_SMALLIOV/UIO_MAXIOV check for >, not >=
* delete bogus casts of msg_iovlen to u_int since msg_iovlen is already a u_intmillert1998-08-051-9/+7
|