Commit Graph

26277 Commits

Author SHA1 Message Date
peter
41db168741 #include "opt_user_ldt.h" so that the #ifdef USER_LDT checks can work, as
commented about at length in the PR audit trail.

PR: 2412
1997-12-27 02:28:28 +00:00
imp
c7312ce4b2 style(9) nits
Submitted by:	bde
1997-12-26 23:36:43 +00:00
imp
87cc203a85 style(9) corrections
Submitted by:	bde
1997-12-26 23:28:17 +00:00
jkh
c539a98883 Change major number to match the one actually used (whoops!).
Submitted by:	Steve Gericke <steveg@comtrol.com>
1997-12-26 23:11:13 +00:00
wosch
5f044fec7f Workaround to avoid a strange core dump.
gzip < /dev/null | perl -npe 's/\003\003/\003\225/' | gzip -d
1997-12-26 21:12:26 +00:00
phk
c9d54c7cc6 Rename "i586_ctr" to "tsc" (both upper and lower case instances).
Fix a couple of printfs too.

Warning: This changes the names of a couple of kernel options!
1997-12-26 20:42:37 +00:00
phk
02ba26589c ename "i586_ctr" to "tsc" (both upper and lower case instances).
Fix a couple of printfs too.

Warning: This changes the names of a couple of kernel options!
1997-12-26 20:41:08 +00:00
phk
d24850217a Reorder to a more conventional if/then/else/endif structure. 1997-12-26 20:15:03 +00:00
hoek
25d7673de7 fork() checks RLIMIT_NPROC, not RLIMIT_NOFILE.
pr:		docs/5260
submitted-by:	Niall Smart [3]njs3@doc.ic.ac.uk
1997-12-26 16:11:49 +00:00
joerg
e4221e7dad Fix some breakage that prevented the Plasmon burners from being used
under -current.  The actual preparation of the next track will now be
deferred until just before the first write operation.  Otherwise,
opening the device with write intent will cause the execution of
commands that are illegal in `limited command set mode' (i.e., after
the write channel has been opened).

While i was at it, cleaned up the worm_open() function a bit.

Removed the volume overflow pre-check in worm_strategy().  It was
time-consuming, and rather useless in many cases anyway (with the size
being reported for just the entire volume only), so we can as well let
the actual SCSI command fail instead, where it'll properly be reported
as EIO.

Partially submitted by & discussed with: jmz
1997-12-26 14:52:29 +00:00
helbig
4a134be151 For regular files the sticky bit is ignored, but the user can still set it. 1997-12-26 12:26:43 +00:00
hoek
938dc036e9 "This is the add^H^H^Hinfo module."
Pedantic comment fix.

PR:		bin/5188
Submitted by:	Alex [3]garbanzo@hooked.net
1997-12-26 05:29:29 +00:00
alex
11c077cd6c Put the return value of getopt into an int, not a char. 1997-12-26 03:24:26 +00:00
wosch
f9af59beb5 Do not install the z*grep man pages if grep was linked with -lz. 1997-12-26 01:53:58 +00:00
jkh
48a94d4416 DISTRIBUTION is bin (we'll make the info dist another way). 1997-12-26 00:19:23 +00:00
jkh
84f7c2e9a1 Nuke info dist. 1997-12-26 00:17:28 +00:00
jkh
c98e3b40e1 Add -lz 1997-12-25 23:08:44 +00:00
dyson
1d073e56f5 The ioopt code is still buggy, but wasn't fully disabled. 1997-12-25 20:55:15 +00:00
gpalmer
fe6aed4012 Make kern.ncpu reports the number of detected processors when running
with a SMP kernel.
1997-12-25 13:14:21 +00:00
hoek
b298ef3a0e Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
dg
9d9967065a The spl fixes in in_setsockaddr and in_setpeeraddr that were meant to
fix PR#3618 weren't sufficient since malloc() can block - allowing the
net interrupts in and leading to the same problem mentioned in the
PR (a panic). The order of operations has been changed so that this
is no longer a problem.
Needs to be brought into the 2.2.x branch.
PR:		3618
1997-12-25 06:57:36 +00:00
julian
9e753bd8ef Add a man page for REMOVING devices from devfs. 1997-12-25 05:54:24 +00:00
alex
1707c1170c Changed pthread_detach to conform to POSIX, i.e. the single argument
provided is of type pthread_t instead of pthread_t *.

PR:		4320

Return EINVAL instead of ESRCH if attempting to detach an already
detached thread.
1997-12-25 05:07:20 +00:00
alex
c6178eb74c Removed unnecessary initialization of hp in gethostbyaddr_r. 1997-12-25 04:21:08 +00:00
ache
2ed6ef512c Add overflow checks: if output size becomes bigger than INT_MAX,
just return EOF
1997-12-25 00:32:17 +00:00
ache
6d6e016701 Correct type of stored argument place (from previous fix) 1997-12-24 23:54:19 +00:00
ache
80277e50eb 1) Restore back comment about snprintf()
2) Optimize string buffer copy to call memcpy() and update pointers
only for count > 0, it makes snprintf(NULL, 0, ...) more efficient
1997-12-24 23:23:18 +00:00
ache
f54c0bca35 Return back to BSD snprintf semantics which recent C9x standard adopts
instead of Singe Unix, thanx Bruce for explaining, I am not realize
standards war was there.

But now, fix n == 0 case to not return error and fix check for too
big n.

Things left to do: check for overflow in arguments.
1997-12-24 23:02:47 +00:00
ache
aca1242199 1) Oops! Insert again if (n == 0) return 0.
Final word is Bruce's quote:

C9x specifies the BSD4.4-Lite behaviour:

       [#3] ...   Thus,  the
       null-terminated  output  has  been completely written if and
       only if the returned value is less than n.

It means that if we not have any null-terminated output as for n == 0
we can't return value less than n, so we forced to return value
equal to n i.e. 0

The next good thing is glibc compatibility, of course.

2) Do check for too big n in machine-independent way.
3) Minor optimization assuming EOF is < 0
1997-12-24 20:24:08 +00:00
imp
a10f3f596e sprintf->snprintf paranoia
Obtained from: OpenBSD (?)
1997-12-24 19:39:57 +00:00
imp
2cab4ca6ce Be extra paranoid about the length of data returned from gethostbyaddr or
gethostbyname.
Submitted by:	Julian Assange
1997-12-24 19:38:18 +00:00
imp
04325fa0d2 sprintf->snprintf paranoia. The one thing that looks like a hole in
the diff is in an ifdef that isn't enabled for FreeBSD.
Obtained from:	OpenBSD(?)
1997-12-24 19:21:09 +00:00
imp
b14c1dcaab Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from:	OpenBSD(?)
1997-12-24 19:13:23 +00:00
imp
986d085dae Use snprintf rather than printf out of paranoia
Obtained from:	OpenBSD
1997-12-24 18:56:03 +00:00
dyson
72f8c6ca62 Support running with inadequate swap space. Additionally, the code
will complain with a suggestion of increasing it.
1997-12-24 15:05:25 +00:00
ache
42a7fea93b Back out part related to "return 0 if n == 0" and return EOF as before.
The main argument is that it is impossible to determine if %n evaluated or not
when snprintf return 0, because it can happens for both n == 0 and n == 1.
Although EOF here is good indication of the end of process, if n is
decreased in the loop...
Since it is already supposed in many places that EOF *is* negative, f.e.
from Single Unix specs for snprintf
"return ... a negative value if an output error was encountered"
this not makes situation worse.
1997-12-24 14:32:40 +00:00
ache
e73e3ecc2a Fix snprintf(...%n...)
to pass not more than buffer size to %n agrument, old variant
always assume infinite buffer.
%n is for actually transmitted characters, not for planned ones.
1997-12-24 13:47:13 +00:00
ache
4838495a16 Remove wrong comment about snprintf:
"return the number of bytes needed, rather the number used"

According to Single Unix specs:

Upon successful completion, these functions return the number of bytes
transmitted excluding the terminating null
1997-12-24 13:17:13 +00:00
ache
2b84b675bc snprintf return value fixes to conform Single Unix specs:
1) if buffer size is smaller than arguments size, return buffer
size, not arguments size as before.

2) if buffer size is 0, return 0, not EOF as before.
(now it is compatible with Linux and Apache implementations too).

NOTE: Single Unix specs says:

If the value of n {buffer size} is zero on a call to snprintf(), an
unspecified value less than 1 is returned.

It means we can't return EOF since EOF can take *any* value in general
not especially < 1. Better variant will be return -1 (it is less then
1 and different with n == 1 case) but -1 value is already occuped by
EOF in our implementation, so we can't distinguish true IO error
in that case. So 0 here is only possible case still conforming
to Single Unix specs.
1997-12-24 12:31:32 +00:00
wosch
c61a85fe81 Small bugfix: store $uid_start instead hard coded value 1000
in /etc/adduser.conf.
1997-12-24 11:44:14 +00:00
brian
f0ec6b0d77 Correct copyright.
Requested by: Eivind Eklund <perhaps@yes.no>
1997-12-24 10:28:38 +00:00
jkh
b8e818ba72 Put the dir file in the correct distribution. 1997-12-24 10:16:49 +00:00
brian
14c2d8291d Cosmetic (style):
sizeof(var) -> sizeof var
  sizeof type -> sizeof(type)

Suggested by: J Wunsch <j@uriah.heep.sax.de>
1997-12-24 09:29:17 +00:00
brian
eb98bd2e03 Use sizeof cftypes128 for NCFTYPES128 macro, not sizeof cftypes !
Lucky that sizeof cftypes < sizeof cftypes128
1997-12-24 09:28:11 +00:00
nate
ea79d01554 - Add prototype for adjust_timeout_calltodo().
Submitted/forgotten by:	Ken Key <key@cs.utk.edu>
1997-12-24 01:33:45 +00:00
imp
5a5c36145e Be extra paranoid about trusting the length of the data returned by
gethostbyaddr.
Submitted by:	Julian Assange
1997-12-24 01:00:24 +00:00
imp
05aeca504f Two fixes:
1) Correct strncpy usage
	2) gethostbyaddr paranoia from Julian Assange
1997-12-24 00:59:49 +00:00
alex
d8258a16a8 Added cross references for apm, cron, inetd, lpd, moused, mrouted,
nfsd, nfsiod, portmap, rpc.lockd, rpc.statd, syslogd, tickadj, and
ypbind.
1997-12-24 00:59:28 +00:00
imp
690fb81274 Minor style nit noticed by bde. 1997-12-24 00:59:02 +00:00
imp
801c7fa509 Be extra paranoid about trusting the length returned by gethostbyaddr.
Submitted by:	Julian Assange
1997-12-24 00:58:39 +00:00