Commit Graph

4330 Commits

Author SHA1 Message Date
Chris D. Faulhaber
420923e972 - Reverse the order of two loop invariant to ensure strlcat() does not
attempt to read memory when siz is 0
- Clarify comments referring to strlcat() usage

PR:		24278, 24295
Submitted by:	Tony Finch <dot@dotat.at>
		Richard Kettlewell <rjk@greenend.org.uk>
Reviewed by:	-audit
2001-01-17 20:51:16 +00:00
Ben Smithurst
4f6964d072 Merge the documentation for sigsetmask() and sigblock() into a
single manual page, appropriately linked, since this removes the
decision of which page the (previously non-existent) sigmask.2
MLINK should point at.

Submitted by:	will
2001-01-17 19:20:58 +00:00
Ruslan Ermilov
1b51e5d0ce man(7) -> mdoc(7). 2001-01-17 18:26:21 +00:00
Ruslan Ermilov
e39c397610 rstat(1) and rstat_svc(8) are the early versions of
the rup(1) and rpc.rstatd(8) manpages respectively.
2001-01-17 11:50:42 +00:00
Robert Watson
f0078215b7 o When returning NULL, return (NULL) instead of return (0).
Submitted by:	jedgar
Obtained from:	TrustedBSD Project
2001-01-17 02:40:39 +00:00
Ben Smithurst
9175520c91 SIGABRT is *not* the same as calling abort(), so don't claim that it is.
(abort() flushes all open stdio streams for one thing.)

PR:		24249
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
2001-01-16 22:25:26 +00:00
Ben Smithurst
13d94cf612 The bit about sigpending not detecting any errors is a lie, it can return
EFAULT.

PR:		24360
Submitted by:	Kenneth Ingham <ingham@i-pi.com>
2001-01-16 21:57:42 +00:00
Ruslan Ermilov
9884911506 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
Ruslan Ermilov
32f6256a49 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
Nicolas Souchu
a35bdd252a Version bump, because of ABI incompatibility.
Suggested by:	Maxim Sobolev <sobomax@FreeBSD.org>
2001-01-15 13:19:05 +00:00
Nicolas Souchu
933d455fac Add Truecolor 16 and 32bits support. Note that 24bits modes are not
supported since it's not easy to put 3 bytes accross 64Kb windows
of memory. This should not be such a problem with linear framebuffers.

There is no major interface modification except that the color type
becomes u_long instead of byte. So one just need to recompile his
application.

Approved by:	Soren Schmidt <sos@freebsd.dk>
2001-01-13 11:30:17 +00:00
Ruslan Ermilov
3fb152c523 man(7) -> mdoc(7). 2001-01-12 18:01:17 +00:00
Ruslan Ermilov
b77b3c00be mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +00:00
Ruslan Ermilov
794b517fa4 man(7) -> mdoc(7). 2001-01-12 13:35:17 +00:00
Ruslan Ermilov
7d17799e90 man(7) -> mdoc(7). 2001-01-12 09:51:45 +00:00
Ruslan Ermilov
d74f3e32c6 man(7) -> mdoc(7). 2001-01-11 20:07:30 +00:00
Ruslan Ermilov
691eb641af mdoc(7) police: fixed (minor) mdoc bugs introduced in previous revision. 2001-01-10 11:32:04 +00:00
Robert Watson
2137646abe o acl_from_text.c:
- errno is already set to ENOMEM (as appropriate) when asprintf(),
    strdup(), or acl_init() fails
o acl_to_text.c:
  - the return value of the initial strdup() is not checked
  - errno is already set to ENOMEM (as appropriate) when asprintf
    and acl_init() fails
  - let the the default: case use 'goto error_label' for consistency

Submitted by:	jedgar
2001-01-09 05:45:03 +00:00
Robert Watson
5db6984b12 o bzero() the ACL structure only if malloc() returns non-NULL.
Submitted by:	jedgar
2001-01-09 05:42:31 +00:00
Robert Watson
695bf79c7c o Correct spelling error from patch in previous commit. 2001-01-09 05:40:54 +00:00
Robert Watson
fe33e45a80 o Add missing initialization of errno from error returns of
cap_get_fd(), cap_get_file() and cap_get_proc().

Submitted by:	jedgar
2001-01-09 05:40:10 +00:00
Dag-Erling Smørgrav
c86c6f748b The user name for anonymous ftp is now "anonymous".
Remove the period after the last man page reference.
Add a reference to RFC1635, and sort the RFC references by number.
2001-01-08 13:46:40 +00:00
Dag-Erling Smørgrav
bf4dd407e3 Back out previous (accidental) commit. 2001-01-08 13:17:21 +00:00
Dag-Erling Smørgrav
80ed165e91 Use "anonymous" rather than "ftp" as login name for anonymous ftp.
Rather than have a separate (misnamed) FTP_ANONYMOUS_PASSWORD constant, use
FTP_ANONYMOUS_USER (i.e. "anonymous") to construct the anonymous ftp password
if getlogin() fails.
2001-01-08 13:15:14 +00:00
Robert Watson
5aa25ec606 o Make acl_from_text() support uid's and gid's as well as usernames
and groupnames, by adding appropriate support to acl_name_to_id()
  in acl_support.c

Submitted by:	green
2001-01-08 01:28:53 +00:00
Chris D. Faulhaber
4786e00b40 Correct check of getgrnam output
Approved by:	rwatson
2001-01-07 21:41:05 +00:00
Archie Cobbs
42cebaa5c0 Fix bugs in the handling of > 8 positional arguments:
- The stack was getting smashed by __grow_type_table()
- reallocf() was being called with the wrong pointer
- The maximum argument number was being incorrectly computed

PR:	misc/23521
2001-01-06 20:48:00 +00:00
John Baldwin
12e275aaee Use a unified libgcc rather than a seperate one for threaded and
non-threaded programs.  This provides threaded programs with the
needed exception frame symbols.

parts submitted by:	Max Khon <fjoe@iclub.nsu.ru>
PR:	23252
2001-01-06 18:59:46 +00:00
Alexander Langer
e2a2e8c7e0 gethostbyname2() is able to lookup AF_INET6.
PR:		23823
Noticed by:	Andrew Arensburger <arensb@ooblick.com>
2001-01-06 12:48:43 +00:00
David E. O'Brien
3f6014e672 Use a unified libgcc rather than a seperate one for threaded and
non-threaded programs.  This provides threaded programs with the
needed exception frame symbols.

parts submitted by:	Max Khon <fjoe@iclub.nsu.ru>
PR:	23252
2001-01-06 06:16:31 +00:00
David E. O'Brien
cad1dd7bb4 Force strong references to several pthread_* functions which are weakly
referenced to by libgcc.a.

This is needed when linking statically as SVR4 (ie, ELF) behavior is to only
link in a module if it satisfies an undefined strong reference from somewhere.
(this surprises a lot of people) Things are different when using shared libs,
the entire library and its modules and their symbols are available at run-time
(when the weak reference is seen to still be unsatisfied and is satisfied on
the spot), this is not the case with static libs.

Thus one can have a static binary with unresolved week references, and at
run-time dereference a NULL pointer.

Submitted by:	eischen
2001-01-06 06:07:52 +00:00
David E. O'Brien
7c6e689224 Add rcsid's. 2001-01-04 10:37:25 +00:00
David E. O'Brien
6e88ecec2c The instructions on doing something with src/lib/csu/powerpc. 2001-01-04 10:27:04 +00:00
David E. O'Brien
38b909640e PowerPC version of the C runtime support.
This is an amalgamation of the NetBSD macppc crt0.c (which the copyright
reflects) and the FreeBSD/Alpha crt1.c.
2001-01-04 10:25:59 +00:00
David E. O'Brien
de7c457799 PowerPC verions of the crt initialization and finalization files required
by the ELF ABI.
2001-01-04 10:05:42 +00:00
David E. O'Brien
2ad094d8bc Fix SCCS id string abuse I introduced. 2001-01-02 09:10:14 +00:00
Ben Smithurst
b9d4121572 Fix typo: ispec -> ipsec
PR:		24005
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-01-01 23:26:16 +00:00
Daniel Eischen
fc1d3c6dfb Change the interface of getlogin_r to return an int. The former
interface was based on a draft version of POSIX whereas the final
(1996) version of POSIX specified that the error is returned.

While I'm here, fix getlogin_r so that it works for more than just
the first time it's called.

Reviewed by:	wes, wollman (man page)
2001-01-01 13:29:19 +00:00
Ben Smithurst
7e7a6ec033 Make it a bit clearer that asprintf doesn't actually "return" a pointer in
the normal sense of the word, but does it through one of its arguments which
is a pointer to a pointer.

PR:		23717
Submitted by:	phk
2001-01-01 05:19:52 +00:00
Guy Helmer
4a4ecab1c6 In call to realloc, pass the number of bytes needed, not simply the
number of login time structures.

Forward the name of the deny capability rather than hard-coding it
in login_hostok.
2000-12-31 16:15:06 +00:00
Poul-Henning Kamp
f42abb1fef Use macro API to <sys/queue.h>
Submitted by:	"Peter Avalos" <pavalos@theshell.com>
Reviewed by:	/sbin/md5 [*]

[*] This line appears courtesy of Mr. Warner Losch, all rights reversed.
2000-12-31 10:28:01 +00:00
Ben Smithurst
42680b3a78 Use macro API to <sys/queue.h> 2000-12-30 21:52:34 +00:00
Brian Feldman
429d49129b Fix a tailq conversion bug that resulted in, e.g., nvi crashing upon
quitting every time.  The way to free a CIRCLEQ was to loop until
the current == current->head, but the way to free a TAILQ is to loop
until current->head == NULL.

In any case, the CORRECT way to do it is a loop of TAILQ_EMPTY() checks
and TAILQ_REMOVE()al of TAILQ_FIRST().  This bug wouldn't have happened
if the loop wasn't hard-coded...

There may be more bugs of this type from the conversion.
2000-12-30 16:10:32 +00:00
Poul-Henning Kamp
fabacd3a11 Use TAILQ instead of CIRCLEQ. 2000-12-29 20:25:01 +00:00
Ruslan Ermilov
672062062d Fixed typo not fixed in previous revision. 2000-12-29 14:36:05 +00:00
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Peter Wemm
88b471a108 Reflect rev 1.18 in crypt.c. Note that this section is somewhat
mangled and could do with some word-smithing.
2000-12-28 11:56:45 +00:00
Peter Wemm
65c10f6d33 Hindsight is wonderful, but I got cold feet over the crypt(3) default
so I am backing it out for now.  The problem is that some random program
calling crypt() could be passing a DES salt and the crypt(3) library
would encrypt it in md5 mode and there would be a password mismatch as a
result.  I wrote a validater function for the DES code to verify that
a salt is valid for DES, but I realized there were too many strange things
to go wrong.  passwd(1), pw(8) etc still generate md5 passwords by default
for /etc/master.passwd, so this is almost academic.  It is a big deal for
things that have their own crypt(3)-ed password strings (.htaccess,
etc etc).  Those are the things I do not want to break.

My DES salt recognizer basically checked if the salt was either 2 or
13 characters long, or began with '_' (_PASSWORD_EFMT1).  I think it
would have worked but I have seen way too much crypt() mishandling
in the past.
2000-12-28 11:23:01 +00:00
Peter Wemm
9886bcdf93 Merge into a single US-exportable libcrypt, which only provides
one-way hash functions for authentication purposes.  There is no more
"set the libcrypt->libXXXcrypt" nightmare.
- Undo the libmd.so hack, use -D to hide the md5c.c internals.
- Remove the symlink hacks in release/Makefile
- the algorthm is set by set_crypt_format() as before.  If this is
  not called, it tries to heuristically figure out the hash format, and
  if all else fails, it uses the optional auth.conf entry to chose the
  overall default hash.
- Since source has non-hidden crypto in it there may be some issues with
  having the source it in some countries, so preserve the "secure/*"
  division.  You can still build a des-free libcrypt library if you want
  to badly enough.  This should not be a problem in the US or exporting
  from the US as freebsd.org had notified BXA some time ago.  That makes
  this stuff re-exportable by anyone.
- For consistancy, the default in absence of any other clues is md5.  This
  is to try and minimize POLA across buildworld where folk may suddenly
  be activating des-crypt()-hash support.  Since the des hash may not
  always be present, it seemed sensible to make the stronger md5 algorithm
  the default.
All things being equal, no functionality is lost.

Reviewed-by: jkh

(flame-proof suit on)
2000-12-28 10:32:02 +00:00
Ben Smithurst
5ff8bb1602 Link stringlist.3 to sl_{add,find,free,init}.3 2000-12-27 20:00:01 +00:00
Dag-Erling Smørgrav
659e0d5ef7 Document FTP_LOGIN. 2000-12-22 18:03:21 +00:00
Dag-Erling Smørgrav
e72f0de24e Check the FTP_LOGIN environment variable before falling back on
FTP_ANONYMOUS_USER.
2000-12-22 18:01:40 +00:00
Daniel Eischen
9ffc4537c8 When retrieving the time of day in nanosleep(), store it in the
global time of day.  This costs us nothing, but is a bit of a hack
to work around a process blocking and not having the time updated
by an ITIMER_PROF signal.

PR:		23679
2000-12-20 17:04:12 +00:00
Daniel Eischen
d73eb8c8ca Enable check for pending signals after calling a signal handler.
Restoration of a threads signal mask after invocation of a signal
handler may allow pending signals to become deliverable.

PR:		23647
2000-12-20 16:55:57 +00:00
Jacques Vidrine
b048419e0d Fix mostly harmless typo:
if (data);
            free(data);

Discovered by:	emacs cc-mode
2000-12-17 21:10:41 +00:00
Ruslan Ermilov
88544700ca mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Dag-Erling Smørgrav
1ba8497660 Avoid a segfault (due to an unitialized pointer) when parsing URLs that have
no scheme or host part.
2000-12-13 11:21:09 +00:00
David E. O'Brien
515f933b8b #endif should not have a non-comment token after it.
GCC 2.97 (snapshot) complains about this.
2000-12-13 08:59:18 +00:00
Robert Nordier
f0da1b03a0 Do install-time configuration of the i386 boot0 boot manager. At
present, this is limited to turning on the packet option if any of
disk slices begin above cylinder 1023.  The effect of this change
should therefore be to automatically enable LBA support, as needed,
when installing FreeBSD.

Something-of-the-kind-requested-by: peter
2000-12-12 17:25:06 +00:00
Ruslan Ermilov
63bd758be4 mdoc(7) police: Now that .Fx macro is parsed, backout
the 1.18 -> 1.20 and fix the .Fx issue the right way.
2000-12-12 10:11:12 +00:00
Kirk McKusick
1f7d250182 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
Robert Watson
6fd0cf5eb0 o Introduce a pile more documentation about capabilities, including
identification and descriptions of most capabilities, current inheritence
  rules, etc.  More to follow.

Reviewed by:	sheldonh
Obtained from:	TrustedBSD Project
2000-12-11 15:25:49 +00:00
Ruslan Ermilov
a2fd3702a3 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:15:20 +00:00
Daniel Eischen
10d1cba0bf Move telldir position recording type definitions and prototypes
to "telldir.h" in order to prevent namespace pollution in
<dirent.h> (which was including <sys/queue.h>).

Add $FreeBSD$ to rewinddir.c and seekdir.c.
2000-12-11 04:00:36 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Alexander Langer
f5009c10dc strunvis(3) and unvis(3) are the same files. 2000-12-08 12:35:06 +00:00
Alexander Langer
e7db1cd82e There are four types of encoding now, not three. Most of them use the
backslash as a special char, but not all.
2000-12-08 12:17:53 +00:00
Paul Saab
3894088f17 When TFTP tries to open a file, it is expecting struct open_file
member f_devdata to be a pointer to a socket number.  When currdev
is "pxe", that assumption is correct.  When currdev is "disk*", that
assumption is incorrect.

Submitted by:	Jim Browne <jbrowne@jbrowne.com>
2000-12-08 05:02:12 +00:00
Ruslan Ermilov
f2b6be9022 Upgrade to groff 1.16.1. 2000-12-06 11:38:34 +00:00
Dag-Erling Smørgrav
6c81eb523e Somewhere along the line, I misunderstood the whole FTP_PASSIVE_MODE debate
and had libfetch selecting passive mode even when FTP_PASSIVE_MODE was not
set at all, which is really quite surprising unless you know about it. So
change it to the agreed default behaviour of selecting passive mode if
FTP_PASSIVE_MODE is set, but not "no".
2000-12-06 09:23:27 +00:00
Ruslan Ermilov
bcec0cefc4 Back this out, we apparently have the ipfw(4). 2000-12-06 06:50:24 +00:00
Ruslan Ermilov
4daefb4d8e ipfw(4) -> ipfw(8). 2000-12-06 06:48:28 +00:00
Daniel Eischen
ef80a53495 Cleanup XXXdir functions to eliminate global hash table of
telldir positions.  This will allow (future) locking on a
per-DIR basis (for MT-safety).  For now, this change does
the following:

  o Remove the hash table from telldir.c.  Recode to use queue
    macros.

  o Remove 'const' from 'telldir(const DIR *)'.

  o Remove 'register' variables as suggested in a recent
    thread.

No response from: -current
2000-12-06 03:15:49 +00:00
Chris D. Faulhaber
f3b0f821b0 Add appropriate defines to use snprintf/vsnprintf instead of
sprintf/vsprintf.

Approved by:	peter
2000-12-06 01:49:08 +00:00
David E. O'Brien
a8e642f574 Change the spelling of .' to .' from .OBJDIR since `.' really is where
generated files land.  Also give precedence to generated files.
2000-12-05 22:10:43 +00:00
John Baldwin
04cb9bbb1e Move the ipfw(4) xref to the description of LOG_SECURITY instead of
LOG_UUCP.

PR:		docs/23302
Submitted by:	cshumway
2000-12-05 20:30:28 +00:00
Thomas Gellekum
962079cf00 Add some missing functions in MLINKS. Link assume_default_colors.3
and use_default_colors.3 to default_colors.3 instead of dft_fgbg.3.
The former seems to be newer and/or better maintained.
2000-12-05 12:40:14 +00:00
Thomas Gellekum
14eadf4703 Install manpages, including appropriate MLINKS. 2000-12-05 12:38:23 +00:00
Brian Feldman
386879a128 Forgot to remove the old line in the last commit. 2000-12-05 02:41:01 +00:00
Hajimu UMEMOTO
eb74b99618 - __ivaliduser_sa() was introduced for forthcoming IPv6 support to lpd
- iruserok_sa() and __ivaliduser_af() were re-organized to use
  __ivaliduser_sa()
- __icheckhost() was re-written to use getaddrinfo() instead of
  getipnodebyname()
- better handling of multiple destination addresses in rcmd()

These changes were basically taken from KAME and changed to fit our
rcmd.c.

Obtained from:	KAME
2000-12-04 18:02:12 +00:00
Ruslan Ermilov
687a7e07cf mdoc(7) police: fix formatting errors in rev 1.27. 2000-12-04 08:11:50 +00:00
John Polstra
882cdc116d When recording the original arguments, stop short if we encounter
a NULL argument.  Some programs change the contents of the argv
array, typically to remove some special arguments.  They shorten
argv by storing a NULL where an argument pointer used to be.  Such
programs core dumped if they called setproctitle(), because it
would try to apply strlen() to a NULL pointer.
2000-12-04 01:45:57 +00:00
John Polstra
4113386c62 When recording the original arguments, don't (ab)use "nargc" for
iterating over the arguments.  Doing so wipes out the value which
is about to be stored into the ps_strings structure.
2000-12-04 01:26:29 +00:00
Matthew Dillon
fbf8638995 Add warning on file-fragmentation issues related to MAP_NOSYNC 2000-12-03 20:17:36 +00:00
Jake Burkholder
4231c165f7 Remove last vestiges of thr_sleep and thr_wakeup from libc. 2000-12-02 05:58:03 +00:00
Garance A Drosehn
bbe8edb0ac Fix some error-handling logic so that ferror is called before fclose,
instead of immediately after the fclose.  The previous logic did work
on freebsd, but is somewhat risky practice (and causes trouble when
porting to other OS's).

PR:		bin/22965
Reviewed by:	Garrett Wollman
2000-12-02 00:07:56 +00:00
Dag-Erling Smørgrav
79aad71d3b Remove some obsolete comments. 2000-12-01 11:05:15 +00:00
Dag-Erling Smørgrav
f9c2053bca Clean up the whitespace encoding code. 2000-12-01 11:04:57 +00:00
Dag-Erling Smørgrav
025bb05a82 Add SCHEME_HTTPS. 2000-12-01 11:04:43 +00:00
David E. O'Brien
2c5569d6ff The GCC 2.96 snapshots have slightly different rules for finding include
files.  Mostly -I${.CURDIR} was needed -- especially for YACC generated
files as the new cpp does not look in the ultimate source file
(ie, the .y file)'s directory as told by the "#line" directive.  Some were
misspellings of "-I${.CURDIR}" as "-I.".
2000-12-01 09:39:28 +00:00
Alfred Perlstein
b217bcfe47 remove unneded sys/ucred.h include 2000-11-30 18:34:08 +00:00
Alfred Perlstein
070f57f520 document O_NOFOLLOW and O_FSYNC flags to open 2000-11-29 04:08:49 +00:00
John Baldwin
9a51cfcde1 Prefix the register argument of indirect 'jmp's with a * to make gas 2.10.x
happy.
2000-11-28 22:59:14 +00:00
Matthew Hunt
fecae3493c The parameter that contains valid options is "optstring", not "optarg". 2000-11-28 22:06:17 +00:00
Maxim Sobolev
1447779521 Add reference to elf(5) in addition to already mentioned a.out(5) and add both
elf(5) and a.out(5) into `SEE ALSO' section.
2000-11-27 15:18:25 +00:00
Dag-Erling Smørgrav
882974d431 Fix old-style proxy specs: default to FTP if FTP_PROXY was set; only default
to HTTP if HTTP_PROXY was used instead.
2000-11-27 13:42:56 +00:00
Dag-Erling Smørgrav
b431558526 Don't try to get the proxy port number from /etc/services. 2000-11-27 13:41:55 +00:00
David E. O'Brien
07a9238fc1 Note that the `fmt' parameter is a printf()-like string. 2000-11-26 23:33:40 +00:00
Kris Kennaway
cca0db7e7e Constify 2000-11-26 11:07:45 +00:00