Commit Graph

6161 Commits

Author SHA1 Message Date
des
611a3df01a PAM-related improvements:
- if operating "as them" (su -l), use pam_{open,close}_session()
 - allow PAM to override $HOME (pam_chroot needs this)
 - chdir early, because later on we may be chrooted and chdir will fail

Also use pid_t instead of int where applicable.
2003-04-08 16:59:53 +00:00
imp
0594a88b7e make prototpyes match functions, and declare things static as needed 2003-04-06 08:30:25 +00:00
imp
c8f6c4c47b Migrate to a new way of dealing with building from old revisions of
FreeBSD.  This method attempts to centralize all the necessary hacks
or work arounds in one of two places in the tree (src/Makefile.inc1
and src/tools/build).  We build a small compatibility library
(libbuild.a) as well as selectively installing necessary include
files.  We then include this directory when building host binaries.

This removes all the past release compatibilty hacks from various
places in the tree.  We still build on tip of stable and current.  I
will work with those that want to support more, although I anticipate
it will just work.

Many thanks to ru@, obrien@ and jhb@ for providing valuable input at
various stage of implementation, as well as for working together to
positively effect a change for the better.
2003-04-05 20:30:30 +00:00
imp
2d24e02b84 Simplify compatibility ifdef. 2003-04-04 04:39:29 +00:00
imp
14832e6e6d No need to check to see if we're running a version of FreeBSD 3.0 current or
newer anymore.
2003-04-04 04:17:14 +00:00
tjr
8520135e3e G/C tconv: It is libmytinfo-dependent and has not compiled for 3+ years. 2003-04-04 01:10:25 +00:00
rwatson
efbd3f1171 If stat() on the terminal specified in utmp fails due to ENOENT, don't
print a warning, and set the idletime variable for the entry to -1;
then pick up the -1 later in sprint() and lprint() and ignore those
idle times by printing just whitespace.  When third party applications,
such as kdm, insert utmp entries, they sometimes use strings like ":0",
which can't be stat()'d and currently result in warnings that are
not helpful to the user.
2003-04-02 20:22:29 +00:00
mdodd
bc8f5d467d Back out support for RFC3514.
RFC3514 poses an unacceptale risk to compliant systems.
2003-04-02 20:14:44 +00:00
ru
a2cbe52412 Mark bits that do not require an object directory as such. 2003-04-01 12:37:54 +00:00
mdodd
6d237ab99a Implement support for RFC 3514 (The Security Flag in the IPv4 Header).
(See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)

This fulfills the host requirements for userland support by
way of the setsockopt() IP_EVIL_INTENT message.

There are three sysctl tunables provided to govern system behavior.

	net.inet.ip.rfc3514:

		Enables support for rfc3514.  As this is an
		Informational RFC and support is not yet widespread
		this option is disabled by default.

	net.inet.ip.hear_no_evil

		 If set the host will discard all received evil packets.

	net.inet.ip.speak_no_evil

		If set the host will discard all transmitted evil packets.

The IP statistics counter 'ips_evil' (available via 'netstat') provides
information on the number of 'evil' packets recieved.

For reference, the '-E' option to 'ping' has been provided to demonstrate
and test the implementation.
2003-04-01 08:21:44 +00:00
obrien
488ffa9207 -{h,k} are mutually exclisive. So only pay attention to the last of the
two when both are given.
2003-03-30 21:25:16 +00:00
obrien
151315bd69 Back out the totally unapproved backout of my commits. 2003-03-29 03:03:42 +00:00
mux
e201143610 xargs(1) is WARNS=6 clean.
Tested on:	i386, sparc64
2003-03-28 16:24:11 +00:00
mux
36346cd456 When -o isn't specified, open /dev/null as stdin.
Suggested by:	jhb
2003-03-28 16:22:54 +00:00
davidxu
bde36c27ac Put child process in a different process group, ensure that the broadcast
signal never affects su directly, some shells changes its pgrp at running
or suspended time, so a broadcast SIGTSTP from child will mess up su's job
control.

Discussed with: bde
2003-03-27 01:32:51 +00:00
keramida
829808e1e4 Explain the format of the at.allow and at.deny files in detail.
PR:		35942
Submitted by:	Gary W. Swearingen <swear@blarg.net>
2003-03-26 02:38:18 +00:00
keramida
1b4bbe9b8e Document the undcumnt -l option (that's a lowercase `el').
PR:		48466
Submitted by:	Peter Philipp <dot.bomb@freenet.de>
2003-03-26 02:00:35 +00:00
eivind
dc4f00c40c Add support for identifying NORID (norwegian top level registry) handles.
Reviewed by:	mike (with slight changes based on feedback afterwards)
2003-03-25 17:00:03 +00:00
jon
c40f7c35df fix reverse logic in "connect" command that cause port specifications to be ignored.
MFC after:	1 week
2003-03-25 02:33:35 +00:00
charnier
05994ec49e The ... utility 2003-03-24 15:53:11 +00:00
tjr
1b2c325f5a The descriptions of the -C and -M options were around the wrong way;
fix this.

PR:		49968
MFC after:	2 weeks
2003-03-24 10:45:12 +00:00
tjr
ab603f72af Add -M, -Q, -S, and -T to the usage message. 2003-03-24 10:40:24 +00:00
mux
b6ac9a469e Add a new -o option to tell xargs(1) to reopen /dev/tty as stdin in
the child process, before executing the command.  This is very useful
when you do stuff like ``find ... | xargs interactive_application''.
Without -o, the application would inherit the pipe as its stdin, and
you thus lose any control over it.

This flag has been carefully chosen to not conflit with other options
of other xargs utilities like GNU xargs.

Reviewed by:	jmallett
2003-03-23 18:29:52 +00:00
grog
d980e5116b Add birthdays of NetBSD and FreeBSD projects. For the former, take
the general opinion of the NetBSD community, 21 March 1993.  For the
latter, take David Greenman's first mention of the project name, 19
Jun 1993.
2003-03-19 00:58:32 +00:00
fanf
030e6e560b Fix English usage: "for security purpose" -> "for security reasons". 2003-03-18 14:24:47 +00:00
fanf
2069e29dd3 The POSIXly-correct /dev/stdout handling added in rev 1.44 makes
careless users vulnerable to terminal control sequence attacks,
since they expect uudecode to just drop (or overwrite) a file in
the current directory. POSIX also says that the full pathname from
the input should be used when writing a file, which we only do if
the -s (shoot me in the foot) option is specified; therefore this
revision means that you now need to use -s for standard /dev/stdout
handling.
2003-03-18 14:19:26 +00:00
obrien
ed2f5a86a3 For the bwk_20030314 version, we have to -DHAS_ISBLANK now.
Oh how I wish the author had accepted my "#ifndef isblank" patch instead.
2003-03-17 08:07:54 +00:00
phk
cce6017a6a Run a revision of the devstat interface:
Kernel:

Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale.  This makes the
device statistics code oblivious to clock steps.

Change timestamps to bintime format, they are cheaper.

Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively.  This removes the locking constraint on
devstat.

Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.

Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).

Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path.  In the up path we accumulate the timeslice in busy_time
and update busy_from.

Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].

Userland:

Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.

Change devstat_compute_etime() to operate on struct bintime.

Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.

Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.

Bump __FreeBSD_version to 500107

Review & Collaboration by:	ken
2003-03-15 21:59:06 +00:00
phk
6a201ff1ce Update to use current rev of devstat API. 2003-03-15 21:25:44 +00:00
marcel
282e3ac2ea Add an -o filename option to have the output written to a file.
This option is present on most uuidgen(1) implementations even
though normal file redirection can be used to achieve the same.

Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-03-15 02:27:10 +00:00
grog
516d850f0a Add death of Gaius Julius Caesar, clarify role of Brutus. 2003-03-15 00:25:43 +00:00
grog
a186b782c7 Remove the death of Gaius Julius. It's not exactly a birthday. 2003-03-15 00:23:27 +00:00
robert
790db710db - For variables holding offset values, use off_t rather than
int, long int or u_int32_t.  This changes the interface of
   all the CRC calculation and output functions from cksum.
 - Print variables of type off_t as intmax_t using a cast and %jd.
 - Use the standardized uint32_t type instead of u_int32_t.
   To have uint32_t defined, include <stdint.h> where necessary.
Style(9):
 - Move #include directives where they belong (esp. crc32.c).
 - Add empty lines between #include directives of system headers,
   standard library headers and local headers.
 - Test a pointer value against NULL.
 - Put a space after the return keyword.

PR:		bin/48424
2003-03-13 23:32:28 +00:00
jhb
cbca737988 Add a default case that just outputs a new line for the case of an
unknown header type.
2003-03-13 18:58:39 +00:00
jhb
6cf9696310 Teach kdump(8) to handle events marked with KTR_DROP. If a record has
KTR_DROP set in its header, then we output an extra line to stdout to
indicate that events were dropped between the previous record and this
record.  It is a bit trickier because we need to always notify the user
if events are dropped even if KTR_DROP is set on a record of a type that
we aren't interested in since kdump(8) doesn't know if the dropped events
were of the types that the user has requested.  To avoid outputting
multiple events dropped notices in between actual event logs, a state
variable is set whenever a drop is logged and cleared whenever an actual
record is output.

Requested by:	phk
2003-03-13 18:46:35 +00:00
glewis
5d58a25622 Happy birthday to me :) 2003-03-12 16:59:30 +00:00
ru
3716349b12 Update for FILE v3.41. 2003-03-12 14:37:01 +00:00
des
251472ad11 Use floating point arithmetic to compute the ETA to avoid integer overflow
during slow transfers of large files.
2003-03-11 21:33:43 +00:00
des
5131847220 Fix style bugs in the previous commit (which weren't in bde's patch) 2003-03-11 11:35:24 +00:00
davidxu
e8ec44b1a3 Reset SIGTSTP handler to default both for parent and child process.
Submitted by: bde
2003-03-11 09:16:51 +00:00
des
7ad113946e Clean up the ETA logic a bit and make sure it works for restarted transfers. 2003-03-11 08:21:51 +00:00
des
c77b08a860 Clarify that -r implies -R. 2003-03-11 08:21:16 +00:00
davidxu
cbab52b0d6 Fix long standing job control bug. SIGTSTP shouldn't be ignored.
Special instructions tested:
suspend
stop $$
2003-03-11 00:10:22 +00:00
obrien
bd0acd6275 Add an embellished lesspipe.sh as described in the man page.
P.S. it is stupid I have to define both SCRIPTS and SCRIPTSNAME.
2003-03-06 04:35:48 +00:00
dwmalone
a8f876921e Update Judaic calendar for this year.
PR:		48297
Submitted by:	Josef Grosch <jgrosch@mooseriver.com>
MFC after:	3 days
2003-03-05 21:13:28 +00:00
peter
fa85dae236 Kill #ifdef NS and some leftover #ifdef ISO code. Re-pack the nlist[]
array, it isn't likely to find any ARPAnet IMP drivers in FreeBSD.
2003-03-05 19:20:29 +00:00
peter
51a1ae6ded Kill references to netns in comment about how it conflicted with netipx so
it was ignored all this time.
2003-03-05 19:19:08 +00:00
fanf
805fc527fb Don't complain about an early end-of-file in the -r case rather than
the opposite. Does this pointy hat look good on me?
2003-03-04 21:22:05 +00:00
ru
30f26bbb54 mdoc(7) police: Revision. 2003-03-03 11:51:30 +00:00
jmallett
10b0f8fde1 Forgot to update the date field; from David Magda <dmagda@magda.ca>. 2003-03-01 23:43:53 +00:00