Commit Graph

3716 Commits

Author SHA1 Message Date
obrien
9c092958f9 Use /usr/bin/cpp as on NetBSD, not /usr/libexec/cpp. 2001-01-09 17:14:04 +00:00
wosch
41607c818a Off by one error in reading mmap data.
Submitted by: Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
2001-01-06 18:17:06 +00:00
will
733a059cc1 Reinstate revision 1.11:
BDECFLAGS; ANSIfy; use EXEC instead of "exec " where appropriate; use
proper types (size_t, int); use proper variable names for certain things;
get rid of static 'cache' style stuff by moving and sanitizing the
original SHELL checking code to main(), this also makes it easier to
free() the string; rename file-scope system() to exec_shell(); use
snprintf() everywhere instead of sprintf(); actually remember to free()
other malloc()'d char pointers in main().

I left out the -s option in this revision along with getusershell()
checking because of objections made by Warner Losh <imp> and Garrett
Wollman <wollman>.  I agreed with their assertions that such code was
unnecessary in a program like this.

I dare people to make this coredump now.

Some suggestions:	nectar (snprintf() truncate checking)
Reviewed by:		markm, eivind, jedgar
Tortured by:		examples in apply(1), fuzz(1),
			and a lot of random ideas I came up with
2001-01-05 18:15:17 +00:00
will
886dcc6eec Back out last commit; it had string function mistakes. I will fix this
and make sure it works next time.

Submitted by:	markm, jhb
2001-01-04 20:11:09 +00:00
will
0330cb2382 Document new -s option: pass a shell to apply(1) when the desired shell
isn't found in /etc/shells.
2001-01-04 19:28:34 +00:00
will
e26199dd3a BDECFLAGS; de-__P()-ify, ANSIfy, use snprintf() instead of sprintf(),
especially on strings passed from argv; rename system() to exec_shell(),
and make it static; use strlcpy() and make sure it works; use proper
type (size_t) to be passed to malloc()/realloc().

Use getusershell() to make sure the SHELL environment variable passed is
safe to use.  Add new option -s to allow anal users to pass things like
perl; this option is here along with getusershell() checking since the
such checking is only intended to affect things like suidperl that might
call apply(1).

Reviewed by:	markm, jhb, C. Stephen Gunn <csg@waterspout.com>
2001-01-04 19:05:49 +00:00
dwmalone
e4031b126e Update for 2001.
PR:		23456
Submitted by:	jgrosch@mooseriver.com
2001-01-04 11:20:25 +00:00
des
a2912f74e1 .publickey -> .pubkey to match other finger daemons.
Suggested by:	assar
2001-01-04 10:03:44 +00:00
dwmalone
53a3f56764 Use a slightly better documented way of calculating easter and
include a reference to the Calendar FAQ. Also make argument parsing
a little more robust.

PR:		23881
2001-01-02 11:35:57 +00:00
mjacob
455cbaec15 Oops, I'm such an idiot. For reasons I don't really agree with,
all devices are by default known by their 'cooked' name, so
my change was wrong. I thought it was a hangover from old 'block
tape device' support which hasn't worked (if it ever did) since
v6/PWB.

So, the default tape name is now the same as Linux. Far out, man....
2000-12-31 20:29:56 +00:00
mjacob
7278f73086 The default is /dev/nrsa0 (now), not /dev/nsa0. 2000-12-31 08:17:58 +00:00
phk
f2049d4440 My bad, committed the submitted patch rather than the fixed patch. 2000-12-30 21:56:18 +00:00
phk
4ea1588b37 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	phk
2000-12-30 21:22:54 +00:00
phk
4cc97bc78a Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	phk
2000-12-30 21:17:03 +00:00
phk
7fd96a9db3 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 21:02:25 +00:00
des
7880bf45e4 Add support for a .publickey file.
Submitted by:	Svein Skogen <tds@nsn.no>
Reviewed by:	brian, ru
2000-12-29 11:39:25 +00:00
phk
a31c18820d Used macro-API to <sys/queue.h>.
Submitted by:	ben
2000-12-29 09:27:57 +00:00
ru
6ab0b23323 Prepare for mdoc(7)NG. 2000-12-27 16:52:31 +00:00
will
975932b1d1 Fix for the case where the first two entries returned by readdir() are
actually NOT '.' and '..'.  Apparently this isn't the case when accessing
a directory via XFS over NFS on SGI systems.  Since I don't have access to
an environment like that, this will sit out in -current for at least six
weeks.  However, the patch proposed by the submitter seems acceptable, so
I've decided to commit it to the tree, in the hope that it will solve some
problems without bringing up others.

PR:		23300
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2000-12-26 07:36:07 +00:00
ps
aca59bd7bc Use the real user ID so non-root users can kill setuid processes
they started.

PR:		23356
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
2000-12-25 19:26:07 +00:00
obrien
2f37ea4d17 Don't abuse the SCCS `@(#)' for RCS.
Requested by:	bde
2000-12-25 01:16:12 +00:00
dwmalone
8921eca1c0 As far as I can tell, you have never been able to use 'ab' as a unit
name if 'a' and 'b' are unit names. You can use 'a b' though.
2000-12-24 16:15:28 +00:00
des
d6547b8df5 Warn if the size of the remote file isn't known.
If the -R option was specified, don't truncate the local file even if its
mtime is incorrect.

PR:		bin/23719
2000-12-22 18:23:19 +00:00
brian
466c3bf443 Hostnames are case-insensitive 2000-12-22 15:21:06 +00:00
ben
fde2e04b05 Fix printf(1) for cases where a long string with no format specifiers is
followed by a %d (probably others too) format specifier.

Reviewed by:	audit
2000-12-21 22:21:38 +00:00
brian
b92a08961b If the utmp login time is greater than the tty atime, use it to calculate
the idle time instead of the atime.

This makes entries for people that have logged in but done nothing
else show up correctly.

Reviewed by: markk@knigma.org
2000-12-21 01:30:47 +00:00
ru
e6cfc0711d Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
f52bf7fae4 mdoc(7) police: document IPv6 options in the SYNOPSIS. 2000-12-18 08:37:53 +00:00
rwatson
4853249b9b o Fix up includes which built due to excessive nested including in the
base system, but not in BruceBSD.
o Fix up style violations of various sorts.
o Remove redundant normalization of hertz variable, as the sysctl handler
  does this work (unlike when kread was used).

Submitted by:	bde
2000-12-17 18:43:28 +00:00
ume
b73769d0a6 IPv6 support for logger.
Reviewed by:	freebsd-current
2000-12-16 18:33:08 +00:00
des
8c8c3b5c0e Fix a bug introduced in rev. 1.17: initialize variables before use, not after.
Rev. 1.17 was "Obtained from NetBSD", but is significantly different from the
equivalent NetBSD revision (rev. 1.30), which does not have this bug.
2000-12-16 02:14:37 +00:00
ache
f15d921e9e Fix lseek args order (PR 23549)
Catch and report lseek errors too
While reading header don't attempt to continue reading
if some IO operation fails

PR:		23549
2000-12-15 13:20:43 +00:00
phantom
9417b1b80a Fix typo reported by Rich Morin <rdm@cfcl.com> on -doc mailing list.
Correct .Xr macro usage.
Also fix few more typos while I'm here.
2000-12-14 16:27:11 +00:00
ru
e5a37f2e6f mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
ru
c23c39b3a4 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
ru
1a1c44f0b2 mdoc(7) police: removed history info from the .Os call. 2000-12-14 11:40:41 +00:00
des
5612c73391 If the URL did not specify a scheme, try to guess it from the host name. 2000-12-13 11:26:27 +00:00
jhb
a0ae816020 Catch up to the new kinfo_proc. 2000-12-12 23:31:44 +00:00
ru
a703a84786 Remove hard-sentence breaks, canonify .Dd (no leading zero). 2000-12-12 14:46:55 +00:00
ru
4f93cb1f4a Document what Idle=* means in a short format display. 2000-12-12 13:37:34 +00:00
mckusick
cba301121b Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
2000-12-12 07:25:57 +00:00
phantom
697c4f2cd8 Re-add home born file(1) and magic(5) manual pages. Update them to
current file(1) version (3.33)

Approved by:	obrien
2000-12-11 15:50:04 +00:00
ru
ee79097019 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:47:53 +00:00
charnier
2363c20c22 Add rcsid. Remove unused #include. Remove error() definition and replace
with warn().
2000-12-10 20:54:13 +00:00
charnier
1a7832d527 Remove one more incorrect section name. Typos.
Add rcsid. fprintf -> warn.
2000-12-10 20:52:43 +00:00
obrien
88f98d711e Add history. 2000-12-10 01:10:54 +00:00
obrien
31a5760aa2 The options I added where not formated to new manpage style specs. 2000-12-09 19:03:21 +00:00
obrien
e5081ac94e Add or fix FreeBSD IDs. 2000-12-09 09:52:52 +00:00
obrien
ae466e022e "Implement -[n]fcb (formatting of block comments) and attempt to implement
no-space=after-sizeof (not optional) and no-space-after 'struct foo *'
(not optional).  Without these, indent unKNFizes even more perfectly KNF code."

Submitted by:	bde
2000-12-09 09:45:09 +00:00
obrien
c2ee1dcc02 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00