Commit Graph

1729 Commits

Author SHA1 Message Date
Peter Wemm
165dc08286 setsid is declared in <unistd.h>, which is self sufficient (doesn't need
prior <sys/types.h>)

Fixes PR#3229, from Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1997-04-08 10:43:47 +00:00
Guido van Rooij
0fb28c0973 Fix race
Obtained from: Keith Bostic
1997-04-07 18:01:10 +00:00
Andrey A. Chernov
21b4da0751 Restore PATH_LOCALE functionality using issetugid() call now 1997-04-07 08:54:38 +00:00
Andrey A. Chernov
b15443ba83 Speedup in case locale not used 1997-04-04 20:10:53 +00:00
Andrey A. Chernov
b5a6eb1833 Speedup in case locale not used 1997-04-04 19:40:49 +00:00
Andrey A. Chernov
21d58869ce Speedup in case locale not used 1997-04-04 19:16:08 +00:00
Andrey A. Chernov
6a575f6e24 Eliminate some function calls when locale not used 1997-04-04 19:08:19 +00:00
Andrey A. Chernov
ed2bf9a999 Eliminate yet one function call when locale not used 1997-04-04 19:07:02 +00:00
Andrey A. Chernov
5058254947 Speedup in case locale not used 1997-04-04 18:44:19 +00:00
Andrey A. Chernov
350498c58e Speedup in case locale not used 1997-04-04 18:28:38 +00:00
Jordan K. Hubbard
138b38c068 Add libg++ 3.0 1997-04-03 06:08:28 +00:00
Mike Pritchard
5d00c0a499 Honor the nouser/nogroup flag when determing if NULL should
be returned if a cached uid/gid does not exist in the password
file.
1997-04-03 01:51:34 +00:00
Peter Wemm
8959b2546d Update to include details about the changes to setuid/setgid. 1997-04-02 17:24:16 +00:00
John Polstra
bb789b9ea2 Fix an error in the previous revision that caused make world breakage. 1997-04-02 16:49:18 +00:00
Mike Pritchard
1595890a1f The user_from_{uid,gid} routines would return garbage if the
uid/gid in question was in the cache, but did not exist
in the password file.  This causes the -nouser and -nogroup
options to find(1) to only print the first file owned by
an unknown user/group in some cases.
1997-04-02 06:20:04 +00:00
Mike Pritchard
134970f671 Grammar police. 1997-04-02 05:52:22 +00:00
Andrey A. Chernov
28804f92db Add Id
Reduce space for error bufer from 512 to 128: there is no such long strings
can be returned from strerror()
1997-04-02 04:24:39 +00:00
Andrey A. Chernov
81d9597ce7 Code space optimization in uu_lockerr() 1997-04-02 03:53:49 +00:00
Andrey A. Chernov
2875419215 Remove unused USE_PERROR define and syslog.h include
Use snprintf instead of sprintf to avoid buffer overflows
Use snprintf in uu_lockerr instead of lots of hardcoded constants
and not null-terminated strncpy
Return "" for OK and "device in use" for INUSE, it allows simple
strcpy(buf, uu_lockerr(retcode)) without testing for special OK
case (NULL was there) and obtaining meaningful result for INUSE
("" was there) without special testing for it too.
1997-04-02 03:38:29 +00:00
John Polstra
6f78fb0cc1 Correct the most glaring errors. I have a feeling there are some
left.
1997-04-02 01:42:07 +00:00
Andrey A. Chernov
72daaae383 Link chown with lchown 1997-04-01 23:07:55 +00:00
Andrey A. Chernov
f7000016df Add issetugid.2 to MAN2 list 1997-04-01 22:57:56 +00:00
John Birrell
38d7083fcf Fix the return value. Oops. 1997-04-01 22:52:43 +00:00
John Birrell
1cec64c4d6 Fix indentations. Sigh. 1997-04-01 22:51:48 +00:00
John Birrell
745a12fc30 Make error checking less zealous to handle devices like /dev/null
which don't provide a non-blocking interface.

This is a short term "fix" which changes a half-lose to a half-win.
The thread that accesses a device that does not provide a non-blocking
interface will block for its time slice.

A medium term solution would be to use rfork. A long-term solution
would be some sort of kernel thread/SMP implementation.
1997-04-01 22:49:58 +00:00
John Birrell
e710f8d85b Add parentheses to make blocking mode work. 1997-04-01 22:44:18 +00:00
Mike Pritchard
02dd678d7e Xref the new issetugid(2) man page where appropriate.
Also add additional set*id(2) xrefs where appropriate.
1997-04-01 18:58:38 +00:00
Mike Pritchard
625fe116e7 Don't xref setregid(2) twice - one of them should be setreuid(2). 1997-04-01 18:50:56 +00:00
Mike Pritchard
51aa564f75 Fix one very minor mdoc problem. Gentle enough, Peter? :-) 1997-04-01 18:45:57 +00:00
Mike Pritchard
13bf59efdc Fix a minor grammar problem. 1997-04-01 18:06:33 +00:00
Mike Pritchard
698fdb70ff MLINK uu_lockerr(3). 1997-04-01 17:44:58 +00:00
Mike Pritchard
b5ebf1f5cd Mdoc police. 1997-04-01 17:44:31 +00:00
Bruce Evans
67fd3b9895 Simplified install rule. 1997-04-01 13:53:16 +00:00
Jean-Marc Zucconi
0b905bf2d5 Fix the output format for numbers >= 1E99.
Closes PR bin/648.
1997-04-01 02:32:41 +00:00
Jean-Marc Zucconi
10adfec195 Add the -DPedantic flag. This is used in wref.c only. 1997-04-01 02:27:11 +00:00
Brian Somers
687d0cdeb3 Remove the syslog stuff, and allow various return values
in uu_lock().  Add uu_lockerr() for turning the results of
uu_lock into something printable.  Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly  where it should.

Suggested by:	ache@freebsd.org
1997-03-31 22:51:00 +00:00
Peter Wemm
0e1cf9a328 General cleanup and update to specify exactly how our implementation
passes on the status across fork/exec.

The previous version had some typos, referred to itself as link(2) in
one place :-), and didn't really match openbsd's implementation either.

Now that I've mentioned typos, hopefully our Typo Police and Xref Police
will be gentle with me. :-)
1997-03-31 16:36:14 +00:00
Peter Wemm
8996ff49a1 Steal issetugid man page from OpenBSD. Needs work..
Obtained from: OpenBSD
1997-03-31 15:59:14 +00:00
Peter Wemm
374506988c Add libc hook for issetugid() 1997-03-31 15:43:22 +00:00
Peter Wemm
30493bb81b Create lchown() in libc and document it as a variation of chown(). 1997-03-31 12:37:35 +00:00
Bruce Evans
7288802ce0 Fixed wording of previous change.
Obtained from:	fgets.3
Guided by:	ISO C standard
1997-03-31 05:18:27 +00:00
Warner Losh
e57e56abf0 Revert my last few changes. They were bogus. Replaced them with
the original text plus a statement saying that if strftime fails,
the results are undefined.

Requested a long time ago by: bde
1997-03-31 04:51:13 +00:00
Brian Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
Andrey A. Chernov
a080f5787d Remove orand* code as promised for the next release 1997-03-29 19:55:03 +00:00
Andrey A. Chernov
79d07a3202 Remove unneded define from CFLAGS (from orand* compatibility) 1997-03-29 19:45:07 +00:00
Andrey A. Chernov
ffdb787e62 Remove orand* compatibility as promised (next release) 1997-03-29 19:44:14 +00:00
John Polstra
162fc7cd57 Remove conflicting declaration of sys_errlist, which caused make world
breakage.
1997-03-29 17:42:32 +00:00
Bruce Evans
58d6cb893a Fixed #includes in synopsis to compile.
Fixed #includes in synopsis to declare the prototype in the synopsis.
Fixed stale types in description of struct dirent.
1997-03-28 12:27:42 +00:00
Mike Pritchard
6c0aebfa90 The w+ entry description was misformatted.
Pointed out by: bde
1997-03-27 18:08:23 +00:00
David Nugent
c333ae82c1 Remove minor warning (for -Wall -Wshadow); clarifies code. 1997-03-26 15:42:09 +00:00
Mike Pritchard
6629a7327d Get my last commit right. The NOTE section now reads:
The sa_mask field specified in act is not allowed to block SIGKILL or
SIGSTOP.  Any attempt to do so will be silently ignored.

Now where did I leave that pointy hat...
1997-03-25 18:33:23 +00:00
Warner Losh
4545c5b7a4 Restricting $LANG was a really bad idea
Pointed out by: Everybody but Jordan.
1997-03-25 05:36:37 +00:00
Warner Losh
99a0772b8d Back out 1.14 until I reproduce trouble reports 1997-03-25 05:34:31 +00:00
Mike Pritchard
eb5ca91408 Change the description of how attempts to block SIGKILL and SIGSTOP
are handled.  The system call will actually fail in this case - the
system doesn't silently ignore the request.  Closes PR# 3047

Pointed out by: fenner
1997-03-25 03:39:54 +00:00
Warner Losh
6e42740802 Don't overflow buffers, and only open alternative termcap files if we're
not running setuid or setgid.

Fixes PR 2586

Submitted by:	Julian Assange
1997-03-24 06:41:30 +00:00
Warner Losh
3f2c98c480 Don't honor LANG or NLSPATH if we're setuid/setgid.
Fixes PR 2582

Submitted by:	 Julian Assange
1997-03-24 06:15:07 +00:00
Warner Losh
79d71652cf If we're running setuid/setguid then don't open the host alias file to
prevent information leakage.

Closes PR 2578

Submitted by:	Julian Assange
1997-03-24 06:11:44 +00:00
Warner Losh
418d4a9817 Don't open the tz file if we're running setuid or setgid to prevent infomration
leakage.

Submitted by:	Julian Assange
1997-03-24 06:09:50 +00:00
John-Mark Gurney
bb135fe9a1 add xrefs for getpeername, so other people that look for it can find it.. :) 1997-03-24 01:22:01 +00:00
Warner Losh
62f187a4cf Buffer overflow. Similar, but different, to the fix that Julian A submitted
in PR 2580.

Obtained from: BSDi by way of Keith Bostic

Should be in 2.2 and 2.1.x.  I'll merge into 2.2.
1997-03-23 23:31:50 +00:00
Warner Losh
d1942b2e76 Fix a minor buffer overflow.
Obtained from: BSDi by way of Keith Bostic
1997-03-23 23:17:22 +00:00
Andrey A. Chernov
92936d823f Add srandomdev.3 link 1997-03-23 23:12:59 +00:00
Andrey A. Chernov
f409763500 Fix urandom reference in the comment 1997-03-23 23:09:31 +00:00
Andrey A. Chernov
7b0b1b2f29 Add srandomdev() description 1997-03-23 23:08:31 +00:00
Andrey A. Chernov
301cf5d3e4 Add srandomdev() function (use "/dev/urandom" now)
Submitted by: wollman & me (add type casts and remove unneded loop)
1997-03-23 22:40:20 +00:00
Mike Pritchard
1c2eb98219 Remove an extra comma. 1997-03-22 23:48:12 +00:00
Mike Pritchard
8a7f0369b3 Use the .Tn macro for generic FreeBSD references. Other minor cleanup. 1997-03-21 20:57:20 +00:00
Mike Pritchard
9de8ddb8bc Mdoc cleanup. 1997-03-21 20:46:30 +00:00
Bill Paul
effbdb690f Document SCM_CREDS changes. 1997-03-21 16:52:05 +00:00
John Polstra
cf49f43912 Add backward compatibility so that static executables built on
modern FreeBSD systems will syslog properly on older systems that
still name the logging socket "/dev/log".  This includes pre-2.2
versions of FreeBSD as well as BSD/OS systems.  If the connect to
"/var/run/log" fails, the function now tries to connect to
"/dev/log" as a fallback.
1997-03-20 16:28:27 +00:00
Mike Pritchard
1bca868c73 Don't use the undocumented .Fr (function return value) macro for function
arguments.  Use .Fa instead (the output is the same).  Also fixed
a formatting error.
1997-03-19 22:09:08 +00:00
Bruce Evans
433671e348 Fixed missing #include of <sys/types.h> and wrong arg types in synopsis.
Reviewed by:	wollman
1997-03-19 19:41:20 +00:00
Bruce Evans
d06390f68b Fixed misquoted arg in synopsis. 1997-03-19 02:01:27 +00:00
Bruce Evans
f0821c98f2 Fixed wrong return type for tputs() in synopsis. 1997-03-19 01:57:06 +00:00
Bruce Evans
26838e4e99 Fixed this header to compile with gcc -pedantic -Werror (removed comma
at end of enum).
1997-03-19 01:54:04 +00:00
Bruce Evans
8e868ec864 Fixed synopsis (missing #includes and consts). 1997-03-19 01:33:23 +00:00
Bruce Evans
2d2781ff2c Fixed synopsis. Some float functions claimed to have the same name as
the double version.
1997-03-19 01:28:44 +00:00
Bruce Evans
9837ab3f80 Fixed quoting in .Fn macro invocations in synopsis. The args must be
quoted individually.  Quoting them all together sort of worked, except
for scsreq_build(), the long arg list was chopped near column 80, to
no avail since the closing parentheses was put on new line by itself.
1997-03-19 01:15:44 +00:00
Bruce Evans
1d23531445 FIxed arg types (mostly missing consts) in synopsis. 1997-03-19 00:58:07 +00:00
Bruce Evans
09589ca82e FIxed arg types (mostly missing consts) in synopsis. 1997-03-19 00:52:58 +00:00
Bruce Evans
7a30f18397 Added missing #include of <stdarg.h> to synopsis. Moved prototypes for
`v' functions after this #include (same organisation as in printf.3 for
printf/vprintf).
1997-03-19 00:43:13 +00:00
Bruce Evans
3ce29386aa Fixed missing function types in synopsis. 1997-03-19 00:32:42 +00:00
Bruce Evans
f68da8d891 Fixed synopsis (put all of the function (return) type info in .Ft and
none in .Fn).
1997-03-19 00:06:09 +00:00
Bruce Evans
ea6bd16b04 Removed unnecessary quoting of function names in synopsis to simplify
automated checking of synopses.
1997-03-18 23:57:33 +00:00
Eivind Eklund
43ec585267 Re-order terms to avoid potential pointer overflow, and remove one
more potential buffer overflow.

Submitted by:	bde
1997-03-18 16:09:27 +00:00
Poul-Henning Kamp
753da60320 Check for overflow in size argument.
Tested by:	Joel Maslak <j@pobox.com>
Closes:		PR kern/2964
1997-03-18 07:54:24 +00:00
Andrey A. Chernov
94fa7afda3 Fix arg types to match Lite2 1997-03-17 16:27:16 +00:00
Eivind Eklund
92d1e8a27b Buffer overflow fix - closes PR bin/2983 for -current. Should really
go into 2.2.0 Release, even at the present time.  Problem spotted by
Tero Kivinen <kivinen@ssh.fi> - was in BugTraq today :-(
1997-03-17 09:30:19 +00:00
Bruce Evans
1fe82dfebf Updated prototype for mount() to match Lite2 reality for the 1st arg
and Lite1 or earlier reality for the 4th arg.
1997-03-13 21:11:33 +00:00
Peter Wemm
d01a28e222 Part 2 of a failed commit (cvs broke). Original message:
Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD
because it's potentially dangerous (think: symlink races).  Move
realpath() back to it's original location, and remove getcwd_physical()
by renaming it back to getcwd() and zapping the original getcwd wrapper.

Noticed by: bde

The following commits already happened but the log message got lost:

Modified Files:
   gen/Makefile.inc gen/getcwd.c stdlib/Makefile.inc
Removed Files:
   gen/realpath.3
1997-03-13 06:58:46 +00:00
Peter Wemm
098f04f5d1 Back out a dubious Lite2 change to "optimise" getcwd() to look at $PWD
because it's potentially dangerous (think: symlink races).  Move
realpath() back to it's original location, and remove getcwd_physical()
by renaming it back to getcwd() and zapping the original getcwd wrapper.

Noticed by: bde
1997-03-13 06:45:38 +00:00
Jean-Marc Zucconi
2cdf6aaa5e Add a pair __BEGIN_DECLS/__END_DECLS 1997-03-13 00:13:25 +00:00
Bruce Evans
9786bca933 Make this man page really match the current <sys/signal.h> again and
the 2.x <sys/signal.h> for the first time :-).  The type of ss_sp
was lexically different.
1997-03-12 17:16:22 +00:00
Mike Pritchard
1ec7f27c99 Make this man page match the current <sys/signal.h> again :-).
Bruce says that since NetBSD, OpenBSD and Linux currently
use ss_sp, we won't be changing it to the lite2 ss_base.
The type may change at some later date.
1997-03-12 16:23:36 +00:00
Mike Pritchard
d6582c6735 Update the structure to match how things are going to appear after
bde commits some changes later tonight.
1997-03-12 15:35:52 +00:00
Mike Pritchard
1d104f9fbd More cleanup - I didn't realize that this was a new man page
and need extra attention :-)
1997-03-12 15:21:57 +00:00
Bruce Evans
1da37b4c38 Restored a .Fa line that was lost in the Lite2 merge. 1997-03-12 15:18:28 +00:00
Mike Pritchard
1da7386d34 Mdoc cleanup. 1997-03-12 15:14:07 +00:00
Bruce Evans
c047aec843 Fixed merging error. Lite2 fixed premature failure and didn't
touch duplicate group suppression, but the merge blew away our
duplicate group suppression.

The merge also blew away the -Wall cleanup in rev.1.5, but that
was misformatted, so I didn't restore it.
1997-03-12 14:54:22 +00:00
Mike Pritchard
ed1fa5e0fd Cleanup some of the Lite2 merge. Most of it is mdoc cleanup,
but in one case the Lite2 changes were flat out wrong and
caused the man page to disagree with a header file.

There are still some *roff macro calls that were added that
I have yet to figure out what to do with in some of the man pages.
1997-03-12 14:49:41 +00:00
Bruce Evans
03dcee8db1 Fixed errors in the Lite2 merge. Some style changes were mismerged.
My changes to preserve errno across free() and close() and to report
fstat() errors properly were blown away.

Updated the FreeBSD changes to match the Lite2 style fixes.
1997-03-12 12:35:44 +00:00
Peter Wemm
beb9f61579 Fix problem with FD_SET* overflow reporting.. Perror() didn't have enough
args, and errno hasn't actually been set so it probably doesn't make sense
to report it via strerror().

Pointed out by: bde
1997-03-12 11:10:54 +00:00
Peter Wemm
9547ea9f3a _res_close() -> res_close()
Pointed out by: bde
1997-03-12 11:02:00 +00:00
Bruce Evans
e1dfe717ec Document that popen() uses a bidirectional pipe (in FreeBSD) and not a
socket pair (as in Lite2).
1997-03-11 19:28:24 +00:00
Bruce Evans
035e5608d5 Fixed cleaning up after malloc failure, which was broken by Lite2.
We don't use socketpair(), so don't #include <sys/socket.h>.

Restored some gcc-quieting parentheses that were lost in the Lite2 merge.
1997-03-11 18:51:43 +00:00
Bruce Evans
1662ffff99 Install the Lite2 getvfsbyname.3. The old getvfsbyname() interface is
still available and described in getvfsent.3.
1997-03-11 18:20:06 +00:00
Bruce Evans
6d50b78d4d Fixed #include's in synopsis. 1997-03-11 18:16:02 +00:00
Peter Wemm
adf6ad9e69 Merge from Lite2:
filesystem include updates, duplicate group suppression, cleanups,
  filesystem whiteout support (unionfs), bidir popen().
1997-03-11 11:52:33 +00:00
Peter Wemm
0014b4c0e1 Merge from Lite2: man page updates 1997-03-11 11:47:52 +00:00
Peter Wemm
1edb99c337 Merge from Lite2 (YAMFL2? :-)
Document that popen() can now create bidirectional pipes and handles.
Note that this needs to be updated since we have a native bidirectional
pipe and don't use socketpair() here.
1997-03-11 11:46:19 +00:00
Peter Wemm
e5574dc8c0 Merge from Lite2 (+realpath.3) 1997-03-11 11:42:56 +00:00
Peter Wemm
4ace1b5205 Merge from Lite2 (whiteout/unionfs) 1997-03-11 11:41:46 +00:00
Peter Wemm
4f02b68a12 Merge from Lite2 1997-03-11 11:40:40 +00:00
Peter Wemm
4381233dc5 Merge Lite2 changes 1997-03-11 11:39:58 +00:00
Peter Wemm
9dc1164189 merge from Lite2 - realpath() now shares a lot of code with getcwd()
and is now in the same file.
1997-03-11 11:37:59 +00:00
Peter Wemm
5faf00b5da Merge from Lite2 onto mainline -
- add undelete() and undelete.2 (requires libc minor bump some time)
  - man page updates
1997-03-11 11:35:56 +00:00
Peter Wemm
e5493ddb0f This commit was generated by cvs2svn to compensate for changes in r23658,
which included commits to RCS files with non-trunk default branches.
1997-03-11 11:29:42 +00:00
Peter Wemm
662909a780 Import CSRG 4.4BSD-Lite2 lib/libc onto vendor branch 1997-03-11 11:29:42 +00:00
Peter Wemm
0b7ae03c1a Import CSRG 4.4BSD-Lite2 includes onto vendor branch 1997-03-11 11:11:37 +00:00
Guido van Rooij
1ab96f9344 Check for overflow of FD_SET 1997-03-10 19:32:46 +00:00
Bill Paul
09e8462819 Fix brain-o in SunOS passwd.adjunct stuff: !strstr(s, "##") is a) bad
style and b) the wrong logic. Should be strstr(s, "##") != NULL. (Note
that the passwd.adjunct stuff has not been merged into 2.2 so this bug
is not in that branch.)
1997-03-10 16:47:19 +00:00
Bruce Evans
9faa8dc6cc Use __ieee754_sqrt() instead of sqrt() internally. Similarly for the
float versions.  Using sqrt() was inefficient.

Obtained from:	NetBSD
1997-03-09 16:29:29 +00:00
Bruce Evans
6b04d9918b Include <machine/asm.h> instead of kernel-only <machine/asmacros.h>. 1997-03-09 14:01:11 +00:00
Stephen McKay
ac225cf76d Clarified the behaviour of dup2(fd1,fd2) when fd1==fd2 and when fd1 is invalid.
Safe for 2.2!
1997-03-09 13:16:48 +00:00
Mike Pritchard
2d3868141d The first argument to fts_set was wrong. Part of PR# 2917. 1997-03-09 00:43:49 +00:00
Mike Pritchard
e2493e0fc3 Pause() is made obsolete by sigsuspend(2), not sigpause(3).
Part of PR# 2917.
1997-03-09 00:42:46 +00:00
Paul Traina
845c706cee Install opie.h in /usr/include 1997-03-08 19:42:41 +00:00
Wolfram Schneider
4ccb26e49a Allow comments in group database.
The character `#' introduces a comment. Leading spaces and tabs are
ignored: '^[ \t]*#.*\n$'

Count an empty line - only spaces, tabs or newline - also as a comment.
(to be compatibel with password database comments). '^[ \t]*\n$'
1997-03-08 16:21:40 +00:00
Paul Traina
1a277b7ae9 API cleanups (use const char * where appropriate)
Cannidate for: 2.2 (please!)
1997-03-08 06:22:51 +00:00
Mike Pritchard
e42337987f Add a missing semi-colon.
Submitted by:	jmg
1997-03-07 06:15:54 +00:00
Bruce Evans
8c950c10ca Fixed wrong magic numbers in scaling. hypotf() was very broken for large
and small values:

    hypotf(2.3819765e+38, 2.0416943e+38) was NaN instead of 3.1372484e+38
    hypotf(-3.4028235e+38, 3.3886450e+38) was NaN instead of Inf
    hypotf(-2.8025969e-45, -2.8025969e-45) was 0 instead of 4.2038954e-45

Found by:	ucbtest
1997-03-05 11:54:00 +00:00
Andrey A. Chernov
1e12d1c9d9 Remove words about lower limit needed (from BUGS section), we have
precise limit now
1997-03-03 23:50:55 +00:00
Bruce Evans
e836e480dc Fixed handling of input failure by the scanf family.
- 0 was returned instead of EOF when an input failure occured while
  skipping white-space after 0 assignments.  This fixes PR2606.  The
  diagnosis in PR2606 is wrong.
- EOF was returned instead of 0 when an input failure occurred after
  zero assignments and nonzero suppressed assignments.
- EOF was spelled -1.

This should be in 2.2.
1997-03-03 17:53:02 +00:00
Warner Losh
59e5dcc34f Use .Sq Li \&\e0 rather than NUL to describe the character with no bits
set, as suggested by Garrett Wollman.   This is more consistant with how
things like strncpy are done, as well as harder to confuse NUL and NULL.
1997-03-03 15:39:06 +00:00
Bruce Evans
cdd42308ce Enabled the Lite2 getvfsbyname(). It's actually named new_getvfsbyname()
for now so that we don't lose library compatibility.  Applications should
define _NEW_VFSCONF and use getvfsbyname() instead of new_getvfsbyname()
if they want the new vfsconf interface.  Parts of the old interface
(enough to load vfs modules, I hope) are still available.
1997-03-03 13:08:33 +00:00
Andrey A. Chernov
ee58dcaeb3 Use stricter MAXLOGNAME now 1997-03-03 09:52:26 +00:00
Andrey A. Chernov
216a8ce058 Reflect current MAXLONGNAME value and specify that null included 1997-03-03 09:17:16 +00:00
Andrey A. Chernov
09f3779132 Don't add/subtract 1 to MAXLOGNAME, it is already NUL-terminated 1997-03-03 08:11:28 +00:00
Mike Pritchard
10fd17786f Change vfc_typenum back to vfc_index in response to bde's
commit to getvfsent.c rev 1.10.
1997-03-03 06:02:54 +00:00
Bruce Evans
0df382bd0f Changed vfc_typenum back to vfc_index. The old vfsconf struct is now
visible again, and the new vfsconf struct didn't match reality.
1997-03-03 05:53:54 +00:00
Andrey A. Chernov
c3e7a0efd1 MAXLOGNAME currently 16, not 12 1997-03-02 21:47:03 +00:00
Warner Losh
8f58838644 Pendantic change of null to NUL. Also warn that this function does not
NUL terminate in the case of buffer overflow.
1997-03-02 20:07:37 +00:00
Bruce Evans
08f68ac6a6 Attempt to import Lite2's getvfsbyname.c. 1997-03-02 18:13:14 +00:00
Bruce Evans
095777c6a0 This commit was generated by cvs2svn to compensate for changes in r23291,
which included commits to RCS files with non-trunk default branches.
1997-03-02 18:13:14 +00:00
Mike Pritchard
6e11b43020 getnetbyaddr now takes an unsigned long as its first argument. 1997-02-28 06:28:53 +00:00
Mike Pritchard
7dbe27136f Oops! I accidently commited a change that wasn't ready for prime
time yet. Revert to rev 1.2.
1997-02-28 06:26:26 +00:00
Mike Pritchard
cd1b6738ab The struct vfsconf element vfc_index is now vfs_typenum. 1997-02-28 06:22:29 +00:00
Mike Pritchard
28f86af297 Correct the xref section - it was incorrectly using .Fn instead
of .Xr for the xrefs.
1997-02-28 05:46:19 +00:00
Andrey A. Chernov
65f50b7f27 "infinity" check was missed from login_getcapsize(), add it
One manifestation of this bug: all networking users have coredumpsize=0
1997-02-27 00:24:05 +00:00
Warner Losh
2a62f02315 Buffer overflow from DNS name information which could cause root access
when called from lpd.

Reviewed by:	jkh, pst
Submitted by:	Oliver Friedrichs <oliver@secnet.com>
1997-02-26 06:12:34 +00:00
Bruce Evans
5d8d8dd3b6 Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x).  This fixes some small (one or two ULP)
inaccuracies.

Found by:	ucbtest
1997-02-24 17:44:08 +00:00
Bruce Evans
9e2d0733c5 Oops, I thought I was fixing the double precision lg10 in the
previous revision.  Use log10f() instead of log10().  log10f() is
currently slightly slower than log10() on P5's, but it is potentially
significantly faster.

Fixed declaration of the C function used in the (unused?) KR_headers
case.
1997-02-24 17:35:33 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Peter Wemm
57ece64fc6 Back out an easy $FreeBSD$ 1997-02-22 11:38:21 +00:00
Bruce Evans
2e6184e901 Split up the Bessel function wrapper files so that most wrapper functions
are in their own file.
1997-02-20 13:35:15 +00:00
Bruce Evans
5ddc00e218 Removed misplaced duplicate of comment about implementation details. 1997-02-20 13:14:06 +00:00
Bruce Evans
487ddb8fa4 Compute (1 - x^2) as ((1 - x) * (1 + x)) instead of as (1 - x * x) to
avoid easily avoidable loss of precision when |x| is nearly 1.

Extended (64-bit) precision only moves the meaning of "nearly" here.

This probably could be done better by splitting up the range into
|x| <= 0.5 and |x| > 0.5 like the C version.  However, ucbtest
does't report any errors in this version.  Perhaps the C version
should be used anyway.  It's only 25% slower now on a P5, provided
the C version of sqrt() isn't used, and the C version could be
optimized better.

Errors checked by:	ucbtest
1997-02-20 12:37:49 +00:00
Daniel O'Callaghan
589dde865b Typogrammatical error 'with' -> 'when'.
This could be put into 2.2.
1997-02-20 06:50:31 +00:00
Wolfram Schneider
b8dc034799 Add forgotten man page link fts_set.3 -> fts.3 1997-02-16 22:32:13 +00:00
Bruce Evans
dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
Bruce Evans
799e5901b3 Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x).  The formula would work if the RHS were
evaluated in extended precision with an extended precision log().
This actually happened with the i387 log() because it returns excess
precision.

Found by:	ucbtest
1997-02-16 17:54:58 +00:00
Bruce Evans
72d8d94d6f Fixed the i87 version of exp(). It returned NaN for args +-Inf. It had
some small (one or two ULP) inaccuracies.

Found by:	ucbtest
1997-02-16 17:38:11 +00:00
Jordan K. Hubbard
c4ebcb3423 Put back .endif clobbered by the previous commit, breaking the
build.
1997-02-15 14:05:42 +00:00
Daniel O'Callaghan
d53ec6c0d0 Reviewed by: Bruce Evans <bde@freebsd.org>
Guard against possible buffer overrun in filename passed.
Another candidate for 2.2.
1997-02-15 07:10:26 +00:00
David Nugent
a60c8a80bc Allow commonly-used "insecure" as a valid keyword in /etc/ttys.
This prevents keywords after "insecure" occurs being errnoeously
parsed as comments.
1997-02-15 05:45:00 +00:00
Bruce Evans
ec7d3a3282 Disabled the i387 version if log1p(). It just evaluates log(1 + x).
This defeats the point of log1p().  ucbtest reports errors of +-5e+15
ULPs.  A correct version would use the i387 fyl2xp1 instruction for
small x and maybe scale to small x.  The C version does the scaling
reasonably efficiently, and fyl2px1 is slow (at least on P5s), so not
much is lost by always using the C version (only 25% for small x even
with the broken i387 version; 50% for large x).
1997-02-15 05:21:16 +00:00
Bruce Evans
b416939d71 Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.h
doesn't need to be included in files that have nothing to do with
syscalls.

Added missing `.text' to START_ENTRY so that ENTRY() works when
invoked in the data section.
1997-02-14 10:57:07 +00:00
Adam David
590f415db7 lite2 remame: vfc_index --> vfc_typenum 1997-02-12 01:34:38 +00:00
David Nugent
e9039c38dc Obsolete fgetline() -> fgetln(); and chop off newline if necessary. 1997-02-10 16:32:03 +00:00
Mike Pritchard
be619c7fbd Update to reflect new Lite2 mount.h and friends. 1997-02-10 07:36:00 +00:00
Mike Pritchard
4cb0cd1bb5 Update to reflect new Lite2 mount.h. 1997-02-10 07:29:25 +00:00
Andrey A. Chernov
e799281533 Move _PathLocale to data-only file, so setrunelocale() not pick up
whole setlocale.c module now.

Should go into 2.2
1997-02-09 09:29:27 +00:00
Warner Losh
5480d8d5c2 Fix PR2579: potential security hole in rcmd.c
Submitted by:	Julian Assange
1997-02-09 06:54:46 +00:00
Joerg Wunsch
cc551f25f4 Do Andrey's homework :) before merging this into 2.2:
. add idempotency #ifdef
. avoid sloppy common-style external declaration.
1997-02-08 14:04:30 +00:00
Andrey A. Chernov
b195036087 Include "setlocale.h" for _PathLocale like other parts already did
Should go in 2.2
1997-02-07 13:05:51 +00:00
Paul Traina
00a825f736 Activate libopie 1997-02-07 03:58:36 +00:00
Paul Traina
8c80565e0f Build libopie from contrib_opie module. 1997-02-07 03:51:56 +00:00
Paul Traina
ae7c505681 Config information for FreeBSD 1997-02-07 03:46:28 +00:00
Andrey A. Chernov
939aed4fb5 Comment out PATH_LOCALE reference
Should go into 2.2
1997-02-06 09:29:02 +00:00
Andrey A. Chernov
63407d3487 Use symbolic constants instead of hardcoded digits
Add range check for setrunelocale since it can be called
directly.
Remove _startup_setlocale compatibility function

Should go into 2.2
1997-02-06 09:11:06 +00:00
Paul Traina
b6b0d266cd Fix yet another setlocale() bug.
Submitted by:	Wojtek Pilorz <wpilorz@celebris.bdk.lublin.pl>
1997-02-06 08:31:42 +00:00
Julian Elischer
c840cec7c5 Submitted by: John Birrell
uthreads update from the author.
1997-02-05 23:26:09 +00:00
Andrey A. Chernov
628abd1b29 Add XXX comment describing potential memset non-portable issue
Nitpicked-by: joerg
1997-02-05 20:54:16 +00:00
Andrey A. Chernov
e56a1af623 Update the comment why range checking is not needed
Should go in 2.2
1997-02-05 19:22:04 +00:00
Andrey A. Chernov
d81a091605 Update the comment why range checking not needed
Fix setrunelocale fail if called directly without prior setlocale
call

Should go in 2.2
1997-02-05 19:17:10 +00:00
David Greenman
5979500afc Killed getenv of PATH_LOCALE per Andrey's suggestion. It was intended
for debugging locale stuff, but was rarely if ever used...and of course
just bit a big chunk out of our collective hind-ends.
1997-02-05 09:53:25 +00:00
Satoshi Asami
d649be870e 1MB is 1048576 bytes, not 1038476 bytes. (I can see that the original
committer wasn't using the MicroSlop Natural keyboard though! :)
1997-02-05 06:06:15 +00:00
Andrey A. Chernov
2b3e51b901 Add yet one comment saying that range checking already done
to stop people "fixing" it by snprintf
1997-02-03 08:29:32 +00:00
Paul Traina
2ed98aa017 Cruft cleanup to eliminate useless warnings 1997-02-02 21:33:37 +00:00
Joerg Wunsch
acf217b342 Make this texinfo file info-aware.
I notice info(1) has some problems moving back and forth through the
resulting info file, but emacs doesn't, so i figure it's rather a
problem with info(1) itself.  To the least, this file installs now
finally.
1997-02-01 11:25:49 +00:00
Mike Pritchard
21ac7f5f23 Don't use hardcoded *roff font change requests. 1997-01-31 01:06:39 +00:00
Mike Pritchard
6a145130de Don't use hardcoded *roff font change requests. Do it
via mdoc macros instead.
1997-01-31 01:00:12 +00:00
Mike Pritchard
c492ccdb9a Very minor mdoc cleanup. 1997-01-31 00:25:12 +00:00
Mike Pritchard
453196eb04 Update to reflect current include files. 1997-01-30 23:10:32 +00:00
Mike Pritchard
1ffa645077 Update to reflect current include files. 1997-01-30 23:01:49 +00:00
Mike Pritchard
a734cc76a8 Dont' mlink getgrent.3 to setgrfile.3, since there is no
setgrfile() function.
1997-01-30 22:52:50 +00:00
Mike Pritchard
f71a0a5ba8 Update to reflect current include files. 1997-01-30 22:39:40 +00:00
Mike Pritchard
d04f83f2e2 Update to reflect current include files. 1997-01-30 21:31:52 +00:00
Joshua Peck Macdonald
e10cf2fa74 Correct "Chflags() will fail it:" to read "Chflags() will fail if:". 1997-01-30 10:25:38 +00:00