3 columns were wasted at the left, except these columns were used to
make the header line up. Now there is no space on the same line for
the "Proc:" part of the header. Try putting this on the line above
although it clutters that line (there is already similar clutter for
the "Interrupts" header). Leave 1 column between these fields. With
the above and a previous change there is enough of space for this.
Use 5 columns instead of 3 for the number of users since 3 is not quite
enough and there was space to spare. This also fixes an off-by-2 error
in a previous fix forthe column count in the comment on STATROW.
Move all the pager fields 1 to the right so that the "count" and "pages"
descriptors more clearly apply to the pager fields and not the memory
fields. There was space to space.
Waste some of the spare space at the right of the pager fields to expand
all the pager field widths to their old values (but now with a column
between the fields). There are fields more in need of expansion but most
of them are not in places near spare space.
made it unnecessary. (Rev.1.6 had to reduce the field width to 4, and
changed 100.0 and preposterous larger values down to 99.9 since 100.0
wouldn't have fitted. Rev.1.35 handles precentages > 99.9 well enough by
changing the format to %.0f when the string given by the initial format
is too wide.)
Even with this change, during short testing I've never seen a percentage
of 100 being displayed by systat -v, although top(1) displays percentages
of 100 user or 100 idle for similar loads.
Always use snprintf()'s return value, since discarding it is a style
bug at best and using it here gives slightly simpler code and better
error checking. Use snprintf() in putlongdouble() the same as in
putfloat(). (1.25 changed most sprintf()'s to snprintf()'s to fix
non-bugs without changing the logic to use the result of snprintf();
1.27 restored one of the sprintf()s by cloning a stale version of
putfloat().)
Don't print a too-long field in the unlikely case that the fallback
to M units in putint() leaves the field still too long. (The fallback
to printing stars was lost in rev.1.58 when the fallback to M units
was added.)
cannot run into other fields or field descriptors. If the value is
too large to fit in the field width, then the output format is adjusted
so that the value (usually) fits, but with fields running together
externally this adjustment usually didn't help. Mostly it doesn't
matter to lose 1 digit of precision, but switching the output format
is bad if it happens often or gives bogus units. The loss of width
is most serious for fields near "Csw" (which are also the ones which
must often ran together) since these have a high variance and large
values relative to the possible field widths so the switch occurs more
often now, and for the memory size fields where the switch gives the
bogus units kKB or MKB.
Now only the fields for r, p, d, s and w can run into each other.
These fields have width 3, and 3 cannot be reduced to 2 without losing
all precision when the value is between 100 and 999.
Trim "pdwake" to "pdwak" at think time now that it doesn't get clobbered
at runtime. The manpage doesn't need to be changed for this because
it documents the clobbered descriptor, unlike for 4 other too-long
descriptors which only get clobbered if there are lots of interrupt
sources.
Trim "% busy" to "%busy" since most other descriptors for percentages
are spelled without the space and this change makes changing the widths
of the %busy fields unnecessary.
around PUTRATE() because PUTRATE() only looked like a function -- it was
multiple statements. Use "do {...} while(0)" as usual in PUTRATE() so
that it is a single statement that can be used like a function.
large. In most cases it is still 1 too large, so fields tend to run
together, but in the following cases it was more than 1 too large, and
the starting column was too small too, so the field started inside the
previous field or descriptor and clobbered that:
- "wire": the number for this overwrote 2 characters of the number for
"Flt". Reduce the field width by 3 (2 to avoid the overwrite and 1
so that the fields don't run together). This was already done for
the preceding number for "cow".
- "inact": the number for this overwrote 1 character of the descriptor
"Idle". Reducing the field width by 2 is enough.
- "cache:" the number for this overwrote 3 characters of the scale
"...| |". The field width should be reduced by 4 to keep things
from running together, but that is a lot and not so necessary here
since the final "|" in the scale serves as a delimiter. Only reduce
it by 3.
- "free": the number for this overwrote 2 characters of the bar graph.
The character position under the final "|" in the scale is apparently
not used, so reducing the field width by 3 is enough.
When "zfod" is in the main vmstat display:
- use the normal field width of 9 (not 5) for it since there is no shortage
of space. Fix style bugs (excessive {}) in the statement that
conditionally writes it.
Write all reduced field widths for vmstat fields as "9 - <reduction>" as
a hint that we don't want to reduce them.
number in more cases by stealing 2 characters from the count field to
give more space in the descriptor field, but it did the column adjustments
for this strangely using an off-by-2 error in the base column and
compensating off-by-2 errors in 6 offsets from the base column (4 new
errors and 2 from not changing the offsets that actually changed).
Print the "Interrupts" header directly at its offset from the base column
instead of spacing it half using the offset and half by printing a space
character.
current tab, however the code it replaced wanted to round to the
next TAB. Consequently things like this:
( echo 1 ; echo 2 ) | column
cause column to loop indefinitely. This patch is slightly different
from the one Gary submitted, but is closer to the original code.
Submitted by: Gary Cody <gary@lyranthe.org>
MFC after: 1 week
events. The specifics of submitting the records is contained within
login_audit.c.
Document the auditing behavior in the man page.
Obtained from: TrustedBSD Project, Apple Computer, Inc.
Approved by: rwatson (mentor)
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]
Fix an error in the handling of IP fragments in ipfw which can cause
a kernel panic. [06:04]
Security: FreeBSD-SA-06:01.texindex
Security: FreeBSD-SA-06:02.ee
Security: FreeBSD-SA-06:03.cpio
Security: FreeBSD-SA-06:04.ipfw
$ su
% kill -STOP $$
where su is executing (t)csh. csh's job handling is a little more
special than that of (a)sh, bash and even zsh and blows up a little
more spectacularly. This modification restores the original mucking
about with the tty pgrp, but is careful to only do it when su (or
su's child) is the foreground process.
While I'm here, fix a STDERR_FILENO spelling as suggested by bde.
su isn't the foreground process. Hopefully this won't break PAM,
but I couldn't find any useful information about ache's theory
that it will.
Specifically, this change fixes the following:
# sh
# echo $$
# su - root -c id &
# echo $$
The PID output changes as su seems to be kill -STOP'ing itself
and catching the parent shell in the process. This is especially
bad if you add a ``su - user -c command &'' to an rc script!
Sponsored by: Sophos/Activestate
Not objected to by: des
type which is a String type that has no -s limitations applied to it.
Change most Strings in the code to Names and add a few extra syscalls,
namely munmap, read, rename and symlink. This was enough to facilitate
following file descriptor allocations in the code more easily and
getting a hint at what's being read/written from/to files. More
syscalls should really be added.
While here, fix an off-by-one bug in the buffer truncation code and
add a fflush so that truss's output reflects the syscall that the
program is stuck in.
Sponsored by: Sophos/Activestate
MFC after: 2 weeks
but don't expect a proper ASCII string to exist right here right now, don't
use strcmp(3) which checks for a NUL. As we're still building the argument
up, the next character might be garbage. It would probably be just as safe to
temporarily write a NUL there, but if we've reached the end of argument memory
that might not be the best idea, I think. It's unclear.
Doing it this way seems to meet the most with the original intent.
PR: 85696
Prodded by: stefanf
with upper and lower case letters from the English alphabet. Change
the number of possible file names mktemp will return from 26**6
to (10+26+26)**6 instead. This keeps things consistent with mkstemp(3)
with FAST_IPSEC rather than the KAME IPSEC stack.
Note that the output of "netstat -s -p ipsec" differs depending on which
stack is compiled into the kernel since they each keep different stats.
This delta also adds the "esp", "ah", and "ipcomp" protocol stats, which
are also available when the kernel is compiled with the FAST_IPSEC stack
(e.g. "netstat -s -p esp").
Submitted by: Matt Titus <titus at nttmcl dot com>
MFC after: 3 days
holiday is now celebrated on December 1st. From the PR:
December 1 was adopted as National Day in 1990, being the day of
celebration of the Great Assembly of Alba Iulia which voted for the
union of Transylvania with Romania and which symbolise the union of all
Romanians within a single state and the achievement of the unity of
Romanian national state. [1]
[1] LAW Number 10 from July 31st, 1990
Regarding the proclamation of the National Day of Romania
http://www.1decembrie.ro/en/index.php?option=com_content&task=view&id=1&Itemid=4
PR: docs/90673
Submitted by: Ion-Mihai "IOnut" Tetcu
Originally pointed out by: Cornel Ilie <cornel dot c punkt ilie at gmail punkt com>