- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
when printing values of "struct vmmeter" in kilobytes as
they don't necessarily fit into 32 bits. (Fix sysctl(8)
reporting of a total virtual memory; it's in pages too.)
Using either one of the two would result in an empty protos[]
array, and no sockets were actually listed:
% sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
% sockstat -6
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
%
Fix this bug by tweaking appropriately the logic of handling opt_4,
opt_6, opt_u and protos_defined.
Submitted by: des
Pointy hat: keramida
behavior of sockstat(1) will still be to show "udp", "tcp" and
"divert" protocols, but we can now provide a (comma-separated)
list of protocols, as in:
% sockstat -P tcp
to list only TCP sockets, or we can filter more than one protocol
by separating the protocol names with a comma:
% sockstat -P tcp,udp
Protocol names are parsed with getprotobyname(3), so any protocol
whose name is listed in `/etc/protocols' should work fine.
Submitted by: Josh Carroll <josh.carroll@psualum.com>
Approved by: des
priority class and use this to:
- print "-" instead of a garbage value for ithreads. Print "-" instead
of the unused nice value for kthreads which are (mis)classified as
PRI_TIMESHARE. For such threads, the nice value can be set to nonzero
by root, but it is never used (at least by the 4bsd scheduler). For
ithreads, we didn't even print the unused value.
- print "i<priority>" and "r<priority>" instead of a biased "<priority>"
for idletime and realtime threads, Here <priority> is the priority
parameter to idprio/rtprio(1). Just add the prefix and remove the
bias for now. <priority> has been stored indirectly in the kernel
since 2001/02/12, and even the kernel cannot recover the original
value in all cases. Here we need to handle more cases than pri_to_rtp(),
but actually handle fewer cases, and end up printing garbage after
a thread changes its current priority while in the kernel.
- for idletime and realtime threads, if they are kthreads then add a prefix
of "k" to the previous string.
- for idletime and realtime threads, if they in the FIFO scheduling class
then add a suffix of "F" to the previous string (if it fits; the other
parts of the string are sure to fit unless <priority> is garbage).
- Reduce the number of global variables
- Make global objects static
- Use bool consistently
- Sort getopt arguments and their processing
- Add function comments
- Change notlast != 0 into !last
Up to now jot would fail to generate the last character in the range
or skew the integer distribution in a way that would generate the numbers
in the range's limits with half the probability of the rest.
This modification fixes the program, rather than documenting the
strange behavior, as suggested in docs/54879.
Also, correctly specify the range of random(3).
PR: docs/54879
MFC after: 2 weeks
sequence of random numbers.
This functionality was lost in revision 1.9 when the random number
generator was switched to arc4random.
PR: docs/54879
MFC after: 2 weeks
system that don't have audit framefork compiled into kernel or ia32 binary
on amd64 system will result in SIGSYS. There is one place in su.c itself
where it tries to check for errno != ENOSYS, but it has been a nop since su
does not catch SIGSYS anyway. There are few other places in libbsm,
where attempt to invoke audit syscal would result in SIGSYS if no audit
support is present in the kernel, so that the only reliable method for
now is to disable SIGSYS completely in the case when BSM is compiled in.
In the long run, both direct invocation of audit-related syscalls and
libbsm should be made more intellegent to handle the case when BSM is not
compiled into the kernel gracefully.
MFC after: 3 days
(provided re@ approval)
o When stat(2) fails (i.e. the file has been moved) there's no new
file with the same name yet, so keep showing the file that's open.
This yields the same behaviour as -f, for which we don't stat(2).
o When a new file with the same name has been created (i.e stat(2)
succeeds but the inode or device numbers differ from the opened
file), show any new lines in the opened file (i.e. the old or
rotated file) before reopening the new file.
These changes fix the observed behaviour that tail(1) doesn't show
the very last lines of the rotated (log) files.
PR: bin/101979
Tested by: Jos Backus <jos@catnook.com>
MFC after: 2 months
- Mention that some of them are POSIX extensions. [2]
PR: docs/85062 [1]
Submitted by: Toby Peterson [1]
Obtained from: wctype(3) [2]
MFC after: 3 days
somewhere around 1348.
The revision log doesn't seem to go back quite that far, but I assume
that the update to this file was forgotten in the celebrations.
While, here, note which countries the other UK patron Saints hold
patronage of.
Sources include http://www.novareinna.com/festive/georgeday.html and
http://www.newadvent.org/cathen/
not in number of pages.
PR: docs/71690
Submitted by: Jan Srzednicki
(A patch is only partially merged, the rest was already fixed by bde@
in rev. 1.51.)
when root doesn't have the permission to enter target user's home directory.
If set, PAM environment variable HOME will be used in chdir(2) instead of
pwd->pw_dir, this allows pam_chroot module to continue to function.