summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/diff.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-10-05Offset into the file can be size_t and add some casts to remove warnings.nicm2-7/+7
2015-10-05Revert if_oqdrops accounting changes done in kernel, per request from mpi@.uebayasi7-20/+19
(Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because IFQ_ENQUEUE() already does it. Oops.) After this revert, the situation becomes: - if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but it is not shown to userland, and - if_data.ifi_oqdrops is shown to userland, but it is not incremented by anyone.
2015-10-05Style nits on a couple of casts.nicm1-3/+3
2015-10-05Use explicit_bzero() instead of memset() for zeroing out secrets.millert8-27/+26
OK deraadt@
2015-10-05this process deserves -fstack-protector-allderaadt1-1/+2
2015-10-05some more bzero->explicit_bzero, from Michael McConvilledjm2-7/+7
2015-10-05correct picasso's birth date;jmc1-2/+2
from comet (freebsd 116952), via richard
2015-10-05alpha ramdisk ran out of space, very slightly. Probably due to thederaadt1-2/+1
development of tame? option CD9660 and mount_cd9660 are already absent, so remove the cd(4) driver ok miod
2015-10-05tame "stdio inet cmsg" should work well in the session engine.deraadt1-1/+4
ok benno
2015-10-05KNF a switch statement, moving a local variable up a frame as well -deraadt1-38/+35
carefully.
2015-10-05Out, damned whitespace!krw1-2/+2
2015-10-05Count IFQ_ENQUEUE() failure as output drop.uebayasi3-8/+14
mpi@ prefers checking IFQ_ENQUEUE() error, and this matches that. OK dlg@
2015-10-05Don't count IF_DROP()'ed packets as if_oerrors too.uebayasi4-11/+4
mpi@ plans to clean-up IF_DROP()'s, but fix consistent use of it for now. OK dlg@
2015-10-05Remove unused errstr variable.millert1-2/+1
2015-10-05use different tame requests if TMPDIR is in env:semarie1-3/+8
- tmppath for when mktemp() operates in /tmp proper - cpath+wpath for use of $TMPDIR based on log-message from previous commit ok deraadt@
2015-10-05Handle ifi_oqdrops in netstat(8).uebayasi1-10/+7
OK mpi@ dlg@
2015-10-05Accumulate ifq_drops into if_oqdrops if if_start().uebayasi1-1/+3
mpi@ questioned usefulness of if_snd.ifq_drops, but this is what exists now. This area is going to be readily polished. OK dlg@
2015-10-05Teach snmpd(8) about if_oqdrops.uebayasi2-3/+4
OK mpi@ dlg@
2015-10-05If expression omits -exec/execdir/-ok primaries, then find will neverderaadt3-3/+12
enter the fork+execve codepath. That allows use of "stdio getpw rpath"! Use of -exec methods have been discouraged for years anyways, with -print0/xargs -0 now considered safer practice. ok guenther millert
2015-10-05Add ifi_oqdrops and its alias to struct if_data.uebayasi2-2/+4
Necessary bumps in Ports will be handled by sthen@. OK mpi@ dlg@
2015-10-05If the -l flag is set, diff will fork/execve pr on a pipe. But otherderaadt1-1/+5
uses can tame "stdio wpath rpath cpath tmppath". tmppath for when mktemp() operates in /tmp proper, but cpath+wpath for use of $TMPDIR. ok sthen millert
2015-10-05correct a rtget() error checksemarie1-2/+2
this function could only return 0 or 1, and 1 on error. avoid to deref an uninitialised variable if rtget() return an error. ok millert@ benno@ deraadt@
2015-10-05these 3 files do not need sys/socket.hderaadt3-6/+3
2015-10-05tame "stdio rpath" or tame "stdio" suffices for all of these programs.deraadt6-14/+37
fairly easy to audit by running nm and noticing nothing beyond base stdio except for fopen/freopen. Then review all callpaths to those functions, and place the tame() calls. ok sthen
2015-10-05This can use tame "stdio rpath" from the top. If we are only working onderaadt1-2/+8
stdin, an additional tame "stdio" is easy. same diff from sthen
2015-10-05tame "stdio rpath" works. (Someone could refactor the processing loopderaadt1-1/+4
to handle the stdin case without rpath, but it looks a bit invasive. ok sthen
2015-10-05Simplify iwm(4) newstate task by only queuing one state transitionstsp2-53/+26
at a time. The newstate task now always transitions to the most recently requested state, rather than hopping along with every request. This allows us get rid of the silly newstate generation counter, and we can now task_del() a pending transition when the interface goes down. While several issues with this driver remain, I believe this change does not introduce new problems. Tested by myself, jasper@, and zhuk@
2015-10-05Factor LACP frame processing out to a separate taskmikeb3-7/+44
This is slightly refactored version of the diff by jmatthew@ that makes use of a single per-trunk task but retains per-port mbuf queues. Running LACP frame processing in a task context allows a simple way to synchronize changes to the trunk ports and trunk itself performed from the ioctl, timeout and task contexts with a kernel lock. OK mpi
2015-10-05Remove 'landisk' from the comment about NUMBOOT archs. Only onekrw1-2/+2
NUMBOOT arch is left: Vax.
2015-10-05fix some spelling messes.sobrado1-4/+4
2015-10-05typo.sobrado1-3/+3
2015-10-05Fix missing checks for truncation of long file names. Rather thanratchov1-14/+28
checking for truncation every time we touch the string, simply allocate a memory chunk large enough to store the full path.
2015-10-05tame "stdio rpath" works fine, as long as we sidestep the demanglingderaadt1-1/+5
process which involves fork+execve.... ok doug
2015-10-05Since the dawn of time, this has contained freopen() for the tty pathderaadt1-2/+2
with mode "w", as root, since "w" implies O_CREAT. That will create the raw file in /dev if it does not yet exist (due to a lie in utmp). It should use "r+", to open it for for O_RDWR only. Oh man this reminds me of 1988, how old is this bug? ok doug
2015-10-05tame "stdio rpath" initially; if we find out the only file operated onderaadt1-2/+8
is stdin, then we can drop directly to tame "stdio" ok doug
2015-10-05tame "stdio rpath wpath cpath fattr", because this creates new files,deraadt1-0/+3
fchmod's them, and possibly renames them. ok doug
2015-10-05refactor, so we don't a C function in a .h file, yuck!deraadt3-57/+27
2015-10-05Fix ip_is_idle_packet() to parse packets properly.yasuoka1-2/+4
diff from Yuuichi Someya
2015-10-05tame "stdio getpw" right at the top; this runs the whole gamut ofderaadt1-1/+4
getpw/gr type functions allowed in that set. ok doug
2015-10-05tame "stdio rpath" for the entire lifetime. newsyntax() could open a filederaadt1-1/+5
very early on, but next() can open one quite late. ok doug
2015-10-05small KNFderaadt1-3/+5
2015-10-05tame "stdio rpath" early on, but if we discover only stdin is beingderaadt1-8/+16
operated on switch to tame "stdio". Reformat a very ugly code block without braces to squeeze the tame calls in. ok doug
2015-10-05use the normal -1 check for tame failurederaadt1-3/+3
2015-10-05use the normal -1 check for tame failurederaadt1-2/+2
2015-10-05tame "stdio rpath" is enough for the general case, which opens filederaadt1-1/+6
after file from argv. If it is discovered to be reading from stdin only, go to tame "stdio" ok doug
2015-10-05Make sure dot is not set after tz - fixes incorrect handling, which allowsjsing2-4/+4
20151005171301+1.09Z to be treated as a valid time. ok beck@
2015-10-05tame "stdio rpath" works here. It may look like the stdin case can avoidderaadt1-1/+4
opening files, but no... a file could indicate nested import of another file, so rpath is needed. ok doug
2015-10-05col can be locked down with tame "stdio", in case it is fed nasty input,deraadt1-1/+4
or if it has bugs. The previous commits by schwarze indicate the latter case was very true until recently... ok doug
2015-10-05banner can be restricted to tame "stdio". if this program is put into aderaadt1-1/+4
foreign-data pipeline, and happens to contain a string handling bug, i do not want it being controlled to open a socket. ok doug
2015-10-05tame "stdio rpath" works for all use cases of pwd(1). In part thisderaadt1-1/+4
success could be because our getcwd() is backed by a system call, unlike historical practice. Didn't think it through competely, but this could burn someone else later, if they try to port this code to another system. Anyways, good enough for us. all cases tested by doug