Commit Graph

8346 Commits

Author SHA1 Message Date
Greg Lehey
e9fd2e2fcc Change copyright notice to the FreeBSD 2 clause notice.
Approved by: John Wehle <john\@feith.com>
2006-12-09 02:33:26 +00:00
Greg Lehey
978b137e05 Add copyright notice. 2006-12-09 02:31:24 +00:00
Greg Lehey
f59dc03825 Set channel utility for Hauuapuge PVR-250 and PVR-350.
This s part of an import of the PVR-250 driver.  Originally it was
calleed pvr250-setchannel, but it seems better to improve this program
to work for any tuner card, so I'm starting with a more generic name.
That shouldn't mislead anybody: currently the program only works with
the (yet to be committed) cxm driver.

Contributed by: John Wehle <john\@feith.com>
2006-12-09 02:27:45 +00:00
Nicola Vitale
7972e25921 - Added my entry in calendar.freebsd
Approved by:	alexbl (mentor)
2006-12-08 23:12:28 +00:00
Maxim Konovalov
37716191a8 o confstr(3) returns 0 on error. Check the return value accordingly.
PR:		misc/106414
MFC after:	1 week
2006-12-06 12:00:26 +00:00
Gabor Kovesdan
f48837e7d4 - Add myself to calendar.freebsd
Approved by:	erwin (mentor)
MFC after:	3 days
2006-12-05 22:22:02 +00:00
Colin Percival
8904d5ecb1 Portability fix for non-POSIX operating systems: Open files in binary mode.
PR:		bin/106358
Submitted by:	techtonik at php dot net
2006-12-05 20:22:14 +00:00
Diomidis Spinellis
f88b45d7df Prevent buffer overflow when forcibly terminating an escape character.
Obtained from:	OpenBSD
Note: In the case of a full buffer the OpenBSD implementation will
leave in the format string an invalid escape sequence.  This appears
to be harmless with our C library, but according to C99 this can
cause undefined behavior.

MFC after:      2 weeks
2006-12-03 17:50:21 +00:00
Diomidis Spinellis
34785a9fc0 Correct handling of format strings with escaped % specifications.
Note: It would be nice to be able to implement getformat() using
fmtcheck(3), but fmtcheck does not distinguish between signed and
unsigned types, a facility jot needs to perform range checks on its
output.

Submitted by:   Per Kristian Hove
MFC after:	2 weeks
2006-12-03 17:05:04 +00:00
Giorgos Keramidas
d2d6d8d537 The sigconv.awk script generates a sigdesc.h header file, which
contains a sigdec[] vector of structures, but the generated output is
missing braces around the initializer of each struct, which
triggers warnings in WARNS=3:

src/usr.bin/top/sigdesc.h:10: warning: missing braces around initializer
src/usr.bin/top/sigdesc.h:10: warning: (near initialization for `sigdesc[0]')

  * Fix the sigconv.awk script to generate a header with initializers
    which look better.

  * Add rules to usr.bin/top/Makefile that rebuilds a new sigconv.h
    header which matches the correct signal set from the build-time
    version of `${DESTDIR}/usr/include/signal.h' (so sigconv.h doesn't
    get stale once changes are made to the header).

  * Remove the old sigconv.h header, now that it is autoupdated at
    build time.

  * Various Makefile style fixes (the committed Makefile was kindly
    submitted by Ruslan):

    - Reorder .PATH, PROG, SRCS and CFLAGS to match style.Makefile(5)
    - Split off the generated sources (sigdesc.h top.local.h) in an
      SRCS+= line of their own.
    - Add entries to CLEANFILES near the rules that generate the
      respective files.
    - Move the explicit rule which builds top.1 after the implicit
      rules which generate its dependencies.

Reviewed by:	ru, bde
Submitted by:	ru (Makefile)
MFC after:	2 weeks
2006-12-01 07:01:19 +00:00
Ruslan Ermilov
bad4d172b4 - Revert signedness type changes to "struct vmtotal"; by making
them unsigned I made the possible overflows hard to detect,
  and it only saved 1 bit which isn't principal, even less now
  that the underlying issue with the total of virtual memory has
  been fixed.  (For the record, it will overflow with >=2T of
  VM total, with 32-bit ints used to keep counters in pages.)

- While here, fix printing of other "struct vmtotal" members
  such as t_rq, t_dw, t_pw, and t_sw as they are also signed.

Reviewed by:	bde
MFC after:	3 days
2006-11-28 12:46:02 +00:00
Yaroslav Tykhiy
d3985f17d4 Back out rev. 1.17: arch-dependent WARNS level.
The policy is that the WARNS level should characterize the
quality of a piece of code irrespective of any conditions.
Otherwise the code doesn't deserve the WARNS level assigned.

Requested by:	ru
2006-11-27 21:30:38 +00:00
Yaroslav Tykhiy
65b02a0f4b Consistently mark percentage scales as such.
PR:		bin/101975
MFC after:	3 days
2006-11-27 20:19:05 +00:00
Yaroslav Tykhiy
04f7f23bf8 Don't shadow globals.
Found by:       WARNS=6
MFC after:      3 days
2006-11-27 19:50:50 +00:00
Yaroslav Tykhiy
da67074ec6 We should return the name in cp, not printf it.
Found by:	WARNS=6
MFC after:	3 days
2006-11-27 19:48:45 +00:00
Yaroslav Tykhiy
c3d6542fd0 systat(1) reaches WARNS=6 on i386 and amd64. This is good
for catching general regressions in future.  Unfortunately,
it still displays some problems at WARNS=6 on architectures
with stricter alignment requirements, e.g., ia64.
2006-11-27 17:54:28 +00:00
Yaroslav Tykhiy
599cc46d95 The logic of fetchnetstat_sysctl() isn't too complex: if idx is 0,
we set and use xtp; if idx is 1, we set and use xip; the other cases
are impossible.  However, GCC cannot see that xip and xtp are always
initialized before use because they are initialized and used in
different if/else blocks.  So setting them to NULL at the very
beginning won't hurt.
2006-11-27 17:34:40 +00:00
Yaroslav Tykhiy
6549e8c62e + WARNS=4 reminds that nlist.n_name isn't const.
+ Use C99 initializers to be WARNS-clean.
+ The last element in a namelist should have its n_name set to NULL,
  not to an empty string.
2006-11-27 17:24:36 +00:00
Yaroslav Tykhiy
9540596e83 Don't discard a const qualifier from constant strings. 2006-11-27 17:01:31 +00:00
Yaroslav Tykhiy
2506efa78c Remove a wrong "const" qualifier.
Spotted by:	WARNS=6
2006-11-27 16:59:08 +00:00
Yaroslav Tykhiy
dfaa9125d8 Add the Tera scale factor, which is an easy job now.
More scale factors would overflow the command line where
the help for "scale" were shown.
2006-11-27 16:33:44 +00:00
Yaroslav Tykhiy
afe7b9fbb5 Stop exposing things that can be private to convtbl.c. 2006-11-27 16:23:09 +00:00
Yaroslav Tykhiy
aee371e363 Keep all convtbl-related constants and strings in convtbl.[ch]. 2006-11-27 16:14:32 +00:00
Yaroslav Tykhiy
f5d4751c8a Allow for large scale factors. C99 warrants that
ULLONG_MAX is not less than 2^64-1; and uintmax_t
cannot be more narrow than unsigned long long.
This allows for scale factors up to Exa inclusively.

Use plain int for the scale index to be consistent
with ifcmds.c and enum.
2006-11-27 15:26:26 +00:00
Yaroslav Tykhiy
41af362198 Return back one initializer, it is needed. 2006-11-27 15:14:50 +00:00
Yaroslav Tykhiy
f301488570 + Drop useless initializers.
+ style(9).
2006-11-27 15:11:30 +00:00
Yaroslav Tykhiy
ce1bff762d Drop useless #includes. 2006-11-27 14:48:46 +00:00
Yaroslav Tykhiy
0230383747 Use C99 initializers so that we don't really have to worry
about the order of related things at several places.
2006-11-27 14:18:54 +00:00
Yaroslav Tykhiy
ab5c9a0d0a C can enumerate things for us. 2006-11-27 14:16:40 +00:00
Yaroslav Tykhiy
00603ea268 There is no reason to use __inline here because we are rather far
from a path critical to performance.
2006-11-26 20:14:47 +00:00
Yaroslav Tykhiy
a3736d312c Don't overflow from the gigabyte scale to the bit scale if the
number to auto-scale is >= 1024 Gb.  Could be triggered on arches
where ifdata counters had 64 bits.

Reported by:	Miroslav Slavkov on -net
MFC after:	3 days
2006-11-26 20:08:40 +00:00
Yaroslav Tykhiy
91857186f2 The real contents of this file were repeated twice.
The repetition was harmless due to a usual #ifndef _FOO_H_ wrapper.
Fortunately, nobody started to hack the second copy,
so just remove it from the file.

MFC after:	3 days
2006-11-26 19:25:10 +00:00
Ruslan Ermilov
8af480aec1 - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
Yaroslav Tykhiy
a6afe5ada8 Fix and extend the -j option to pkill/pgrep WRT the jail
wildcard specifications.  Earlier the only wildcard syntax
was "-j 0" for "any jail".  There were at least
two shortcomings in it:  First, jail ID 0 was abused; it
meant "no jail" in other utils, e.g., ps(1).  Second, it
was impossible to match processed not in jail, which could
be useful to rc.d developers.  Therefore a new syntax is
introduced: "-j any" means any jail while "-j none" means
out of jail.  The old syntax is preserved for compatibility,
but now it's deprecated because it's limited and confusing.

Update the respective regression tests.  While I'm here,
make the tests more complex but sensitive:  Start several
processes, some in jail and some out of jail, so we can
detect that only the right processes are killed by pkill
or matched by pgrep.

Reviewed by:	gad, pjd
MFC after:	1 week
2006-11-23 11:55:17 +00:00
Ruslan Ermilov
20739dfa44 Fix the format specifier suitable for uintmax_t. 2006-11-23 11:51:23 +00:00
Ruslan Ermilov
9623c97258 Oops, fix the format specifier to what was intended. 2006-11-23 11:47:34 +00:00
Greg Lehey
9f238ea6d9 Bump document date.
Nitpicked by:   ru
MFC after:	1 week
2006-11-23 05:08:06 +00:00
Greg Lehey
eb29cfdd00 usage: Include the - in the x flag.
main: Make -x set the hexdump; there's no obvious reason to toggle it.

Nitpicked by:   ru
MFC after:	1 week
2006-11-23 05:07:32 +00:00
Greg Lehey
9a2a66f1bb Add option -x to display output values in hex in addition to decimal. 2006-11-23 00:20:54 +00:00
Maxim Konovalov
0d4d06c9d7 o Check that -w width is not above maximum. Use DWIDTH instead of
hardcoded constant.

Reported by:	Gruzicki Wlodek on BugTraq
Obtained from:	NetBSD, OpenBSD
MFC after:	1 week
2006-11-22 21:05:17 +00:00
Ruslan Ermilov
5c88a11e6e - Fix types of "struct vmmeter" members so they are unsigned.
- 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.)
2006-11-20 16:04:41 +00:00
Giorgos Keramidas
d2d77d2aee In revision 1.14 I broke the -4 and -6 options of sockstat(1).
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
2006-11-12 19:03:39 +00:00
Giorgos Keramidas
1f3d67aade Add support for filtering sockets by protocol type. The default
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
2006-11-11 22:11:54 +00:00
Dag-Erling Smørgrav
1bac3abc07 Try to preserve ownership and permissions when replacing an existing file.
PR:		bin/104702
Submitted by:	Kevin Day <toasty@dragondata.com>
MFC after:	1 week
2006-11-10 22:05:41 +00:00
Bruce Evans
1f575ce8f9 Don't always print a space character in show_stat(), since a space
shouldn't be printed after the last column.  This restores the
formatting to 79 columns.
2006-11-08 15:15:05 +00:00
Frank J. Laszlo
f1f6c4b25e Add my birthdate to the calendar.
Approved by:	flz (mentor)
2006-11-07 14:35:34 +00:00
Bruce Evans
8dbbff5b81 Second stage of unbreaking thr formatting of the NICE field: decode the
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).
2006-11-07 10:03:10 +00:00
Diomidis Spinellis
3241f274f1 Style facelift.
- 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
2006-11-06 15:58:35 +00:00
Tom Rhodes
df449c3551 Add needed hyphens, note the KTRACE kernel option, bump doc date.
PR:		85186
Submitted by:	garys
2006-11-06 15:17:50 +00:00
Diomidis Spinellis
7d71f06cb4 Use a more sensible default of 1 or -1 when only the start and
end values are specified.

PR:		bin/68981
Submitted by:	Stefan `Sec` Zehl
MFC after:	2 weeks
2006-11-06 15:11:50 +00:00
Diomidis Spinellis
d129c68a14 Do What I Mean when the user asks for random integers or characters.
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
2006-11-06 13:55:11 +00:00
Diomidis Spinellis
fee14f30e9 Avoid negative array indices: an empty string can also be used
to specify a default value.
2006-11-06 11:03:43 +00:00
Diomidis Spinellis
1ab8c5be60 See also arc4random
PR:		docs/54879
MFC after:	2 weeks
2006-11-06 10:39:49 +00:00
Diomidis Spinellis
a26a66124e Restore jot's ability to use a seed for producing a deterministic
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
2006-11-06 10:30:29 +00:00
Diomidis Spinellis
55f965ae6a Replace obscure aliases through pointers with plain variables.
MFC after:	2 weeks
2006-11-06 09:15:21 +00:00
Diomidis Spinellis
d737ec1ad4 Merge code in common cases.
Verified by:	New regression tests in tools/regression/usr.bin/jot
MFC after:	2 weeks
2006-11-06 08:47:41 +00:00
Diomidis Spinellis
afe53a4950 Replace opaque numeric bit flag values with #defined identifiers.
While there, add some missing FALLTHROUGH comments.

Verified with:	cmp(1) on the executable
MFC after:	2 weeks
2006-11-06 07:26:16 +00:00
Robert Watson
29a055ac65 Cross-reference libmemstat(3), malloc(9), uma(9). 2006-11-02 19:53:57 +00:00
Tim Kientzle
2bb9582faf Fix "1 day ago", "yesterday" and similar relative-time phrases
when parsing dates.

PR: bin/104934: bug in some date handling of bsdtar
Reported by: Herve Boulouis
MFC after: 3 days
2006-11-02 04:16:15 +00:00
Ruslan Ermilov
324ef9892d Fix a bug converting a variable from the numeric type to a string.
PR:		bin/104795
MFC after:	3 days
2006-10-25 21:23:20 +00:00
Ruslan Ermilov
ec140c9bcf Document the NM environment variable. 2006-10-25 09:40:07 +00:00
Greg Lehey
1d59aaaa9b Bizet was only born once. 2006-10-24 23:18:07 +00:00
Maxim Sobolev
e7d4bf18db Backout previous change (SIGSYS related). The fix has been applied to the
proper place.

Pointed out by:	rwatson
2006-10-24 17:41:28 +00:00
Maxim Sobolev
a88ab48624 Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su on
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)
2006-10-24 08:18:10 +00:00
Ruslan Ermilov
478bf77471 - Document the default disk block usage unit.
- Add option -h, human-readable output.

PR:		docs/53732
2006-10-21 23:57:38 +00:00
Marcel Moolenaar
d5d2cea180 Better handle the -F case:
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
2006-10-21 18:05:06 +00:00
Ruslan Ermilov
e75d2f3694 The vm.zone sysctl has gone; zone stats are now supplied by libmemstat(3). 2006-10-21 10:40:12 +00:00
Ruslan Ermilov
ddf3250846 - Add comma after REQUESTS field missed in previous commit.
- Widen some columns; make width of header columns less cryptic.
2006-10-21 10:16:26 +00:00
Gleb Smirnoff
d0c8105042 Print the number of allocation failures in UMA zones.
PR:	kern/102940
2006-10-21 09:08:35 +00:00
Colin Percival
04f064d680 Document that jot(1), rs(1), and lam(1) first appeared in 4.2BSD.
MFC after:	1 month
2006-10-20 04:31:01 +00:00
Ruslan Ermilov
bb361298a5 Document that unexpand(1)'s -a and -t options are exclusive.
PR:		docs/85063
2006-10-13 16:22:25 +00:00
Ruslan Ermilov
0414904d4c - Document all character classes our tr(1) supports. [1]
- 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
2006-10-13 16:13:45 +00:00
Ruslan Ermilov
82a6e39b28 At least one argument is required. 2006-10-12 21:10:55 +00:00
Ceri Davies
1abf0e15d5 Saint George replaced Saint Edward as the patron Saint of England
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/
2006-10-12 11:08:29 +00:00
Ruslan Ermilov
c01e1768d9 Memory utilization subscreen in "vmstat" display lists numbers in KB,
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.)
2006-10-12 10:54:34 +00:00
Ruslan Ermilov
93f4bf61d4 Don't go beyond the provided string when parsing the `\' character.
PR:		bin/99985
Submitted by:	Nate Eldredge
MFC after:	3 days
2006-10-09 19:37:26 +00:00
Ceri Davies
659a728e18 Update the list of POSIX extensions.
PR:		docs/103859
Submitted by:	shaun
MFC after:	1 week
2006-10-08 10:31:44 +00:00
Florent Thoumie
a6a5a8f2e6 Add a missing new line at the end of the australian calendar file to
suppress and error message.

PR:		conf/99490
Submitted by:	Shaun Branden <shaun@pcuse.com>
Approved by:	cperciva (mentor)
MFC after:	1 day
Sponsored by:	FreeBSD Test-Bugathon
2006-10-06 23:20:01 +00:00
Soeren Straarup
457ce4c37b Adding my birthday
Approved by:	tmclaugh
2006-10-01 16:17:10 +00:00
Maxim Konovalov
b12f653e35 o Remove an obsoleted (and commented out) entry.
PR:		conf/85143
Submitted by:	Helge Oldach
2006-10-01 09:22:05 +00:00
Maxim Konovalov
e854ae2d06 o Strip eol w/spaces. 2006-10-01 06:30:51 +00:00
Maxim Konovalov
aa137175c2 o Add a Gedenktag.
PR:		conf/85143
Submitted by:	Helge Oldach
MFC after:	1 weeks
2006-10-01 06:29:35 +00:00
Ruslan Ermilov
e9aa046ba9 Revise markup. 2006-09-30 17:27:50 +00:00
Ruslan Ermilov
c4baa2453c Markup nit. 2006-09-29 21:17:10 +00:00
Bruce M Simpson
910e1364b6 Nits.
Submitted by:	ru
2006-09-29 16:16:41 +00:00
Bruce M Simpson
2d20d32344 Push removal of mrouted down to the rest of the tree. 2006-09-29 15:45:11 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Luoqi Chen
5a8e64ee60 Do not chdir(2) until after setuid(2), otherwise "su - username" would fail
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.
2006-09-29 04:41:37 +00:00
Matteo Riondato
9e0573fdc2 Set txrx_error to 1 when we reach abort. This makes the program correctly set the exit code.
The PR has further details on this.

PR:		bin/103206
Submitted by:	John Hickey <jjh-freebsd@daedalian.us>
MFC after:	3 days
2006-09-28 21:22:21 +00:00
Stanislav Sedov
af159726bc - Add my birthday entry to the chronicle.
Approved by:	sem (mentor)
2006-09-27 08:25:53 +00:00
Ceri Davies
de5e5e6ead Add a -a option as a no-op for Solaris compatibility, as briefly
discussed on src-committers.  This is intentionally not included in the
usage() function as it would confuse the output too much.

Approved by:	jhb
MFC after:	1 week
2006-09-26 22:28:12 +00:00
Ruslan Ermilov
acc17cb5a5 Fix both arguments to err(). 2006-09-26 05:46:55 +00:00
Dmitry Morozovsky
50789a2f3a Fix bug introduced in rev 1.23:
pw_equal does not check crypted password field, so one cannot change
crypted password keeping other fields intact.

Approved by:	des
MCF after:	3 days
2006-09-25 15:06:24 +00:00
Robert Watson
f4882b24fd Rename "-a" flag to "-A" in order to avoid conflicting with the "-a" flag
as found on Solaris.

Requested by:	ceri
MFC after:	3 days
2006-09-23 15:43:29 +00:00
Robert Watson
5bae3124ab Add a -a argument to id(1), which causes id(1) to print out process
audit properties, including the audit user id.  This can be quite
helpful in debugging audit problems.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2006-09-23 12:30:31 +00:00
Alexander Kabaev
f340c84ebe Pass "-Wtraditional -Wno-system-headers" to compiler as two separate
arguments. GCC4 was unhappy with them combined, while GCC 3.4 did
not care.
2006-09-21 02:05:38 +00:00
Wojciech A. Koszek
60e15662e1 Export tcps_rcvmemdrop available in 'struct tcpstat' with netstat(1).
Requested by:	Tomasz Pilat <tomasz.pilat (at) axelspringer.pl>
Approved by:	andre
2006-09-20 12:29:12 +00:00
Ian Dowse
6508a1ecdc Add missing parentheses to fix a segmentation fault that is easily
reproducable with `jot -s " " 400 1 | column -t'. The bug was present
in the the original CSRG 'column -t' added in 1989.
2006-09-19 22:11:43 +00:00
Maxim Konovalov
a39846b5e4 o Don't leak fd on error.
o parselength() returns 0 or -1 so int is enough for its return type.

Submitted by:	Ighighi Ighighi, sheldonh
MFC after:	3 weeks
2006-09-18 16:39:23 +00:00
Maxim Konovalov
f45b405f7a o optname, the third {set,get}sockopt(2) argument, is an enum, not a bitmap.
Treat it accordingly.

PR:		bin/101642
MFC after:	3 weeks
2006-09-18 13:49:57 +00:00
Ruslan Ermilov
b43d227cab Update manpages for FILE 4.17. 2006-09-17 18:42:35 +00:00
Ruslan Ermilov
8a70619712 Initial memory allocation for fields was off-by-one.
PR:		bin/100443
MFC after:	3 days
2006-09-15 13:33:32 +00:00
Ruslan Ermilov
1007c98db6 Don't require a space between -[fv] and its argument.
PR:		bin/86514
MFC after:	3 days
2006-09-15 13:28:10 +00:00
Joel Dahl
3e1f331553 Remove references to the pam(8) manual page. It does not exist.
Requested by:	novel
Discussed with:	brueffer, simon
2006-09-13 17:46:20 +00:00
Philippe Charnier
488633c7f4 initialize variable (WARNS=6) 2006-09-13 05:06:12 +00:00
Alexander Botero-Lowry
4f9019bb29 Add my birthday to the calendar, sadly I am only the fifth youngest.
Approved by:	novel
2006-09-12 09:05:00 +00:00
Philippe Charnier
b2eeeae049 WARNS=6 chocked on unitialized variable. 2006-09-12 05:08:36 +00:00
Erwin Lansing
890fdf8de1 Update some of the bulgarian holidays since it no longer
is a socialist state.

Submitted by:	Shteryana Shopova <shteryana@FreeBSD.org>
2006-09-08 09:45:06 +00:00
Ruslan Ermilov
2aebb8bcb4 Fixed the -# option to work as documented in a manpage. 2006-09-07 19:48:52 +00:00
Ceri Davies
0033dba88b Chase revision 1.10 in usage string and a comment. 2006-09-07 17:10:26 +00:00
Ruslan Ermilov
934464be64 Bump WARNS level to 3.
OK'ed by:	make universe
2006-09-01 17:09:09 +00:00
Christian S.J. Peron
6319ad282f Integrate audit_submit(3) bits into su. This means that records for
successful and failed su attempts will be recorded using the AUE_su
event type (login or lo class) if auditing is present in the system.
Currently, the records will have a header, subject, text (with the
actual diagnostics), a return and trailer token.

See audit_submit(3) for more information.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2006-09-01 13:39:02 +00:00
Ruslan Ermilov
763e2b058d Fix markup (in the same way as it was fixed in tip.1) and thus
make the diffs against tip.1 minimal (as in OpenBSD).
2006-08-31 20:44:59 +00:00
Ruslan Ermilov
07bb01e3d4 Fix compilation warnings (up to level 3). 2006-08-31 19:19:44 +00:00
Ruslan Ermilov
bfad8c3c1c Document the undocumented change in OpenBSD: the ${raisechar}
is no longer set to ^A by default, it's unset.

Reported by:	imp, sam
2006-08-31 16:40:30 +00:00
Ruslan Ermilov
a9f118adfd Actually merge OpenBSD changes and local changes (a diff should
be viewed relative to revision 1.24).
2006-08-31 16:26:50 +00:00
Ruslan Ermilov
2a98f027e5 Remove some dust. 2006-08-31 14:14:57 +00:00
Ruslan Ermilov
fa92e8831d Resolve merge conflicts. 2006-08-31 14:14:30 +00:00
Ruslan Ermilov
24ede41b96 This commit was generated by cvs2svn to compensate for changes in r161751,
which included commits to RCS files with non-trunk default branches.
2006-08-31 14:12:22 +00:00
Ruslan Ermilov
d391708c06 Import OpenBSD's tip(1) as of today 2006-08-31 14:12:22 +00:00
Xin LI
9dd54fbb7e In rev. 1.2 we have introduced a fallback handler for files with unknown
extensions.  This seems to be unnecessary and prevents less(1) from being
able to detect file changes, so remove the part.

Submitted by:	Eric Huss <e-huss netmeridian com>
PR:		bin/102624
Discussed with:	des
MFC After:	3 days
2006-08-30 08:20:34 +00:00
Joseph Koshy
59b2dc9f8b Manual page tweaks.
Submitted by:	Niclas Zeising <lothrandil at n00b.apagnu.se> on freebsd-doc
2006-08-29 18:11:20 +00:00
Poul-Henning Kamp
fd0232603d Improve input parsing:
Add "-C <column>" and "-d <delims>" options to chop up input lines.

Make '#' a comment character, rest of line is ignored.

Submitted by: Dmitry Morozovsky <marck@rinet.ru>
2006-08-28 08:27:02 +00:00
Ruslan Ermilov
2d05c776ef Remove alpha-specific stuff. 2006-08-23 12:12:56 +00:00
Marcel Moolenaar
e108ac655d Build libsmb and smbutil on ia64. 2006-08-22 03:22:17 +00:00
Marcel Moolenaar
4c5876d2ad Remove alpha left-overs. 2006-08-21 19:49:57 +00:00
Daniel Gerzo
695e93d68e Add myself to the FreeBSD callendar. Ooops, it seems like I'm the
second youngest.

Approved by:	keramida (mentor)
2006-08-20 18:52:37 +00:00
Xin LI
d605d70a75 Hook lessecho(1) to build. 2006-08-20 15:52:17 +00:00
Xin LI
72bc07dc83 Regen. 2006-08-20 15:51:18 +00:00
Yaroslav Tykhiy
6c43fb6f9e Tell in a comment that the symlinks from /usr/bin are
for compatibility with other OS types, too.

Pointed out by:		gad
2006-08-20 04:25:20 +00:00
Yaroslav Tykhiy
55416ca8f7 Install pkill(1), aka pgrep(1), to /bin so that rc scripts
can use this small and nifty utility.  Create compatibility
symlinks from /usr/bin for the time being to avoid breaking
custom scripts relying on the hardcoded path to the utility.

If pkill(1) takes root, its source should be repocopied some
day to src/bin.

Idea by:	des
Discussed with:	brooks (in cvs-src and cvs-all)
2006-08-19 08:24:01 +00:00
Ceri Davies
15af4b716b Further nitpicking. 2006-08-17 16:29:27 +00:00
Ceri Davies
4b3d1ae7a4 Fix a grammatical error.
Funny how one character can completely distort the perception of a sentence :)
2006-08-17 16:20:42 +00:00
Maxim Konovalov
ec2c2c379b o Fix the date of LZ 129 Hindenburg crash.
PR:		misc/102137
Submitted by:	jasper@openbsd
MFC after:	3 days
2006-08-16 11:54:07 +00:00
Giorgos Keramidas
a6dd1c93f4 Add support for splitting at gigabyte boundaries. [1]
Also make both lowercase and uppercase suffix letters work
as byte-count suffixes, i.e. the following two commands are
equivalent now:

    % split -b 4m foo
    % split -b 4M foo

Submitted by:		Roman Divacky [1]
Lots of help by:	cperciva
Reviewed by:		cperciva
MFC after:		1 week
2006-08-10 10:41:47 +00:00
Maxim Konovalov
e4df92e126 o Simple strcpy/strcat replacement.
PR:		bin/101575
Founded by:	Dan Lukes
Obtained from:	OpenBSD, rev. 1.11 by deraadt
MFC after:	2 weeks
2006-08-09 19:12:10 +00:00
Giorgos Keramidas
49198c4297 Update usage & SYNOPSIS and clarify that input files are not removed.
Sort getopt option handling of -p too, while here.

The changes are adapted from a patch by Ruslan Ermilov, posted as
followup to docs/33852.

PR:             docs/33852
Submitted by:   Gary W. Swearingen <swear@blarg.net>
MFC after:      1 week
2006-08-08 21:25:22 +00:00
Bruce M Simpson
abfdccc7ce Update document date.
Noticed by:	ru
2006-08-03 20:43:51 +00:00
Bruce M Simpson
6b04b7f63e Add a new command-line option, -P, which allows the user to specify
an arbitrary port to which syslog messages are to be sent.

PR:		bin/54026
Submitted by:	Oliver Fromme
MFC after:	10 days
2006-08-02 13:21:44 +00:00
Joseph Koshy
1ae9926515 In 'od -c' mode, deal with printable but zero-width combining
characters correctly.  These characters are displayed "combined"
with a space character.

PR:		misc/100215
Submitted by:	"J.R. Oldroyd" <<fbsd AT opal.com>>
Reviewed by:	"J.R. Oldroyd" <<fbsd AT opal.com>> (revised patch)
MFC after:	3 days
2006-07-31 14:17:04 +00:00
Yaroslav Tykhiy
594a130b8a Stop enforcing dependencies between MK_* options at Makefile level.
All the dependencies are satisfied now in <bsd.own.mk>.
2006-07-31 13:29:36 +00:00
Tim Kientzle
fc1e63e49b Remove two unused variables.
Thanks to: Stefan Farfeleder
2006-07-31 04:57:46 +00:00
Tim Kientzle
902ce6f035 Conditionally include sys/mkdev.h on platforms (such as Solaris) that need it.
While I'm here, correctly alphabetize 't' after 's'.

Thanks to: VMiklos
2006-07-30 18:34:40 +00:00
Maxim Konovalov
1b405ff747 o Kill unneeded assignment.
Obtained from:	OpenBSD
2006-07-30 07:41:28 +00:00
Yaroslav Tykhiy
096146f88b - Achieve WARNS=3 by using sparse initializers or avoiding initializers at all.
- Fix a nlist initialization: it should be terminated by a NULL entry.
- Constify.
- Catch an unused parameter.

Tested on:	i386 amd64 ia64
2006-07-28 16:16:40 +00:00
Yaroslav Tykhiy
7b95a1ebbd Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,
including to printf().  Using uintmax_t is also robust to further
extensions in both the C language and the bitwidth of kernel counters.

Tested on:	i386 amd64 ia64
2006-07-28 16:09:19 +00:00
Yaroslav Tykhiy
778d2bddd2 Both fields of struct timeval are of a non-basic type,
so we should cast them to a type printf() knows about.
2006-07-28 11:17:17 +00:00
Yaroslav Tykhiy
b7dd94d5e6 Avoid useless work: Do not build inet6.c if INET6 support is off.
This also avoids pretending that netstat includes inet6.c in the
output from ident(1).
2006-07-28 11:09:21 +00:00
Yaroslav Tykhiy
2cc3124e10 Obey MK_INET6_SUPPORT. 2006-07-27 14:20:14 +00:00
Yaroslav Tykhiy
d1773e839f Respect MK_INET6_SUPPORT.
Move INET6 out of the RELEASE_CRUNCH conditional block
because it saves as little as 2% of the binary size and
IPv6 is rather popular today.  (Some other binaries, e.g.,
telnetd, include INET6 for RELEASE_CRUNCH already.)
2006-07-27 14:19:30 +00:00