Commit Graph

3483 Commits

Author SHA1 Message Date
Warner Losh
c9e0534901 When we have both a rcsid and sccsid, ifdef 0 the sccsid. This
appears to be the standard FreeBSD way to do this.  style(9) is silent
about this, however.
2000-09-04 06:11:25 +00:00
Warner Losh
62f882d620 getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.
2000-09-04 06:09:54 +00:00
Warner Losh
b07b8563ff optarg and optind are declared in unistd.h.
h_error is declared in netdb.h
2000-09-04 05:59:25 +00:00
Dag-Erling Smørgrav
9d40f64ad7 Use dirname(3). 2000-09-03 17:10:00 +00:00
Dag-Erling Smørgrav
2da8f234a1 Use basename(3). 2000-09-03 17:09:41 +00:00
Dag-Erling Smørgrav
74912943bf Don't try to set the mtime of the output file if it's not a regular file.
Pointed out by:	cwt
2000-09-02 09:48:34 +00:00
Dag-Erling Smørgrav
e2b41a622b Don't unlink the target file if it's not a regular file. 2000-08-31 11:24:15 +00:00
Ruslan Ermilov
6159b9dd5b Restore support for displaying raw IPv4 sockets and
correct the author's name.  Were broken in rev 1.6.

Approved by:	des
2000-08-30 13:24:01 +00:00
Dag-Erling Smørgrav
2d090923d6 Invoke netstat(1) and fstat(1) with full path. 2000-08-30 09:18:20 +00:00
Brian Feldman
9fa4c1703e Get rid of the old version. 2000-08-29 23:38:12 +00:00
Brian Feldman
cc70d84c4a Use a C version of which(1).
Submitted by:	Dan Papasian <bugg@bugg.strangled.net>
Reviewed by:	jhb
2000-08-29 23:30:52 +00:00
Peter Wemm
8750ed5f77 After positive feedback from a few folks, activate a switchover to
using killall.c instead of the perl version that depends on procfs.
The C version uses sysctl().  The program is based on a hack that was
originally written about 6 years ago and has evolved somewhat since then.
(which is why it is a superset of killall.pl, rather than being a clone.)

With apologies to: wosch
2000-08-28 22:09:38 +00:00
Bill Fumerola
4dd97a3440 Add 'shot', using the definition used by bars and shotglasses. 2000-08-27 22:02:42 +00:00
Peter Wemm
e1669132dc Try and fix up some bogus indentation leftovers from emacs several
years ago.
2000-08-27 02:12:29 +00:00
Peter Wemm
a03884671d Sigh, today is not my day. Convert a verbose while() .. loop into a for()
loop.

Submitted by:	billf
2000-08-27 01:17:11 +00:00
Peter Wemm
a6b474b6c1 *blush*. I was *sure* I compiled this after the last change..
Add the missing )

Shamed by:	billf
2000-08-27 01:10:55 +00:00
Peter Wemm
1198f21caf killall.c is meant to be a superset replacement of killall.pl, the
main difference is that it uses sysctl to get the process lists rather
than /proc - thereby reducing the dependency on /proc by one more tool.
2000-08-27 00:46:25 +00:00
Brian Feldman
0debe874a0 Fix a premature freeing bug found with malloc debugging courtesy John Hay.
Submitted by:	jhay
2000-08-26 03:42:51 +00:00
Brian Somers
78be7a111a Finger.conf first appeared in 4.2 (now that it's been MFCd) 2000-08-25 22:22:04 +00:00
Brian Somers
475f25ebaf Fix the -m option - broken by the last commit.
Submitted by:	Mark Knight <markk@knigma.org>
2000-08-25 18:28:43 +00:00
Sheldon Hearn
909aa0d5b9 Add a missing comma. 2000-08-25 08:29:28 +00:00
Brian Somers
040864ac7a Allow finger.conf to contain aliases for files that will be displayed
when fingered.

Submitted by: Mark Knight <markk@knigma.org>
2000-08-25 01:01:07 +00:00
Peter Wemm
540bc8d6e1 Quick Fix: swap.c doesn't appear to actually need <sys/conf.h>, so remove
it to try and get world building again.  (sys/conf.h now depends on
sys/types.h)
2000-08-24 20:22:44 +00:00
Alexey Zelkin
86bbb70c13 Install Ukrainian message catalog. 2000-08-22 22:00:57 +00:00
Brian Feldman
04c9749ff0 Add working and easy crypt(3)-switching. Yes, we need a whole new API
for crypt(3) by now.  In any case:

Add crypt_set_format(3) + documentation to -lcrypt.
Add login_setcryptfmt(3) + documentation to -lutil.
Support for switching crypt formats in passwd(8).
Support for switching crypt formats in pw(8).

The simple synopsis is:
edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :)

Reviewed by:	peter
2000-08-22 02:15:54 +00:00
Maxim Sobolev
40b0b5bfa5 Fix a bug introduced by my own previous commit (addition of the current
line/column display).

I overlooked that ee(1) doesn't maintain proper line numbering when
adding/removing lines, so after those operations linenumber displayed may not
match the reality. Also use proper variable for current column diaplay, because
the one used previously reflects the offset of current char, which doesn't
equial screen position when tabs present.

Reviewed by:	bp
2000-08-21 10:21:28 +00:00
David Malone
a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
Ruslan Ermilov
c2a62388b7 Remove gratuitous free() call when we use special .SHELL target. 2000-08-18 10:41:37 +00:00
Sheldon Hearn
2087b4533a Remove extraneous arguments to the Os (operating system) and Nm
(name) macros.

Do not terminate the cross-reference list in the SEE ALSO section
with a period.
2000-08-17 16:57:31 +00:00
Brian Somers
098c6e8747 Allow a /etc/finger.conf file that contains finger aliases
This allows people who's email address differs from their account name
to be fingerable.

Submitted by: Mark Knight <markk@knigma.org>
2000-08-17 10:59:17 +00:00
Brian Feldman
c7322223b9 Allow use of the ${MAKE_SHELL} variable to specify alternate shells for
make(1) to use.  Setting it to "sh" and "ksh" are the only values which
work right ATM; I wouldn't expect "csh" to get you far ;)
2000-08-16 23:31:43 +00:00
Warner Losh
584b694b75 Remove unnecessary extern definition of strrchr. It is defined in
string.h, which already was included.
2000-08-16 16:39:42 +00:00
Warner Losh
3da0bb2e27 Add cross reference to the ast device.
Remove reference to the now defunct wt device.
2000-08-16 16:38:47 +00:00
Gregory Neil Shapiro
2216e2a2cd Complete migration of aliases file to /etc/mail/aliases.
The maintainers of share/examples/diskless/README.TEMPLATING and mergemaster
have been contacted so those may be updated as well.
2000-08-13 18:38:58 +00:00
Bruce Evans
b10fc2ddef Fixed world breakage for the NOSHARED=yes case. Libraries were added to
LDFLAGS instead of to LDADD, so they ended up too early in the command
line.

Don't link to libcrypt.  It is unused for static linkage and unnecessary
and only apparently used for dynamic linkage (the dynamic libskey is
linked to libcrypt to support the crypt parts of libskey which aren't
used here).

Fixed some disorder.
2000-08-12 20:54:47 +00:00
Sheldon Hearn
c47f9a08fc While we're in here:
Remove extraneous arguments to the Nm macro.
Mark up cross-references properly.
Use proper block displays (Bd).
Use proper mark-up for author names (An).
Remove the bogus ARGUMENTS section.
Raname EXAMPLE -> EXAMPLES.
Spell ``S/Key'' consistently.
2000-08-11 08:40:10 +00:00
Warner Losh
b1dbe5c2bc Eliminate the only setuid perl script in the tree.
Original 'C' progam submitted by Juriy Goloveshkin.
A different 'C' program also submitted by dima.

I merged and rewrote them to include error handling, use getlogin for
user name and only the BSD boilerplate license remained from the
original code.  We also only allow root to get other user's keys.

Review, bikeshed and bdelint(1): myself, kris, dima, markm
2000-08-10 22:53:49 +00:00
Hajimu UMEMOTO
d84a1df489 To make compilable without -DINET6.
PR:		bin/20407
Submitted by:	Patrick Bihan-Faou <patrick@mindstep.com>
2000-08-07 16:39:33 +00:00
Mark Ovens
54af9cb58f Document the ``-'' option and minor re-wording in EXAMPLES 2000-08-05 23:03:12 +00:00
Sheldon Hearn
e62d73a2a1 Merge the truncate(1) utility onto the RELENG_4 branch and adjust
the HISTORY section to reflect the first release of FreeBSD in
which this utility will appear.
2000-08-04 08:05:52 +00:00
Ruslan Ermilov
61793a0c8b Do not display icmp(4) sockets as non-existent bridge(4) sockets. 2000-08-03 14:53:41 +00:00
Ruslan Ermilov
6bc4ee4976 Unbreak world build by adding the necessary <net/ethernet.h> include.
Submitted by:	Nickolay Dudorov <nnd@wint.itfs.nsk.su>
2000-08-02 07:37:44 +00:00
Ruslan Ermilov
ed7cf099c6 Make auto-generated ioctl.c to be always considered out of date
since it could potentially depend on any ${DESTDIR}/usr/include
preprocessor file.  This fixes the broken -DNOCLEAN world build
I experienced yesterday.
2000-08-01 10:21:13 +00:00
Ruslan Ermilov
a7e7621042 Fix an off-by-nine error when building a list of includes. 2000-08-01 08:15:06 +00:00
Maxim Sobolev
3bd77c5644 Add current position (line, column) display. 2000-07-31 14:02:51 +00:00
Kris Kennaway
ffd044a699 Don't segv when trying to add a 0-length unit name.
Some string-related cleanups inspired by OpenBSD.

Reviewed by:	asmodai
2000-07-31 10:49:08 +00:00
Kris Kennaway
3890f2357a Don't coredump on long input lines. If anyone actually cares, this should
be fixed to actually process long lines instead of truncating them.

Obtained from:	OpenBSD
2000-07-31 10:14:06 +00:00
Eivind Eklund
1e2f8412e0 Make passing unknown fstypes to -fstype result in a warning instead of
an error.  As it was, which find command lines that would work (be
accepted at all) was dependent on the presently running kernel, making
script writing and porting hard.
2000-07-28 20:02:42 +00:00
Warner Losh
9ad6473aef Do include <unistd.h> for getopt interface.
Don't extern it.
2000-07-28 06:50:25 +00:00
John Polstra
3cfac2c58d Fix bug: "netstat -si" prints interface information, but the header
line is missing.  This apparently was broken in revision 1.31 of
"if.c".

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-28 04:05:04 +00:00