Commit Graph

859 Commits

Author SHA1 Message Date
Kris Kennaway
54b8fe08cf Remove unnecessary #include <stdlib.h>
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:48:28 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
a307d59838 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
David E. O'Brien
8dfd7bcddf MFS: add the FreeBSD history. 2001-07-10 00:12:50 +00:00
David E. O'Brien
6e6c8a08c8 Give the FreeBSD history also. 2001-07-10 00:11:00 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov
3d1455a39d mdoc(7) police: compact VFCF_ list. 2001-07-04 10:42:03 +00:00
Dima Dorfman
f9eeb822d0 mdoc(7) police: fix spacing issue
Submitted by:	ru
2001-07-03 21:16:34 +00:00
Dima Dorfman
ff5f0dbc41 Fix a one-byte overrun.
PR:		28472
Submitted by:	David Xu <davidx@viasoft.com.cn>
Obtained from:	OpenBSD
2001-06-28 21:50:53 +00:00
Dima Dorfman
9351f51fd8 getcwd(3) is defined by POSIX, not ISO C.
Approved by:	bde
2001-06-28 19:27:02 +00:00
Dima Dorfman
9a66daa5d4 Document the existing vfc_flags.
PR:		25837
Submitted by:	Tony Finch <dot@dotat.at>
2001-06-28 06:50:19 +00:00
Dima Dorfman
a910f192bb Remove duplicate words. 2001-06-24 01:34:38 +00:00
Dima Dorfman
12985df355 Fix a grammar bogon. 2001-06-20 22:03:10 +00:00
Garrett Wollman
3f22a03fa6 Fix spelling of `errno' and add cross-references. 2001-06-18 22:26:31 +00:00
Garrett Wollman
5813675eed Document _SC_IOV_MAX. Add cross-references to pathconf(2), confstr(3), and
getconf(1).  This document still needs to be sorted and to have other missing
parameters described.
2001-06-18 22:18:08 +00:00
Garrett Wollman
37336173d3 After one too many PRs on the subject, bite the bullet and define IOV_MAX
and its associated constants.  Implement _SC_IOV_MAX in the usual way.
Be a bit sloppy about the namespace question; this should get cleared up
in time for 5.0.

MFC after:	1 month
2001-06-18 20:24:54 +00:00
David Malone
75328eca8d If the username we are trying to look up in the db files won't fit into
the buffer then act like it doesn't exist. The buffer is always big enough
for any valid username.

PR:		27860
Reviewed by:	nectar
2001-06-18 16:09:24 +00:00
Ruslan Ermilov
589ee357a4 Complete prototype for fts_compar. 2001-06-13 14:59:57 +00:00
Ian Dowse
f9f6897972 Make the non-threaded stub for pthread_sigmask() a no-op instead
of calling sigprocmask(). This matches the behaviour of thr_sigsetmask()
on Solaris; _pthread_sigmask_stub was added purely for compatibility
with Solaris (for TI-RPC), so it might as well do the same thing.

This fixes the problem where client RPC calls ignored all signals
for the complete duration of the RPC. This behaviour is currently
necessary in the threaded case due to locking issues, but was never
intended to occur in non-threaded programs.

Reviewed by:	deischen
2001-06-11 23:18:22 +00:00
Dima Dorfman
4088069c3a Xref dladdr(3).
Requested by:	-hackers
2001-06-08 22:50:33 +00:00
Kris Kennaway
93a8551831 Fix another unprotected instance of chdir() by extending the
fts_safe_changedir() function and using that instead for both of the
chdir()s.

Partially submitted by:	Todd Miller <millert@OpenBSD.org>, bde
2001-06-01 21:53:50 +00:00
Kris Kennaway
fdeb0156dd When doing the chdir("..") in the !FTS_NOCHDIR case, stat() after we get
there and compare the inode and device numbers to the values we remember,
to guard against the directory having been moved around in the meantime.

Reported by:	Nick Cleaton <nick@cleaton.net>
2001-05-30 20:35:44 +00:00
Eric Melville
2de2196026 Add warnings about trusting user-supplied data.
Reviewed by:	ru
Approved by:	murray
Obtained from:	OpenBSD
2001-05-25 20:42:40 +00:00
Ruslan Ermilov
d4aac95ca2 Fix the range of the returned value.
PR:		docs/27446
Submitted by:	Tadayuki OKADA <tadayuki@mediaone.net>
2001-05-23 12:37:50 +00:00
Ruslan Ermilov
58ceb60878 Suppress compiler warning by adding a type cast. 2001-05-17 12:51:43 +00:00
Dima Dorfman
cd18ccdc30 Introduce getprogname(3) and setprogname(3) library calls. These get
and set __progname, respectively.

Discussed on:	-arch (Feb 2001), -audit
Reviewed by:	-audit
Approved by:	kris
Obtained from:	(mostly) NetBSD
2001-05-15 23:41:01 +00:00
David E. O'Brien
5e6220d9d0 * include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
2001-05-02 23:56:21 +00:00
Mark Murray
e16138fead Compensate for header dethreading. 2001-05-01 09:30:02 +00:00
Joerg Wunsch
b2bcd87e4f Fix directory reads of MNT_UNION mounts, where entries present in both
layers would be displayed twice.

PR:		bin/26498
Submitted by:	Olliver Fromme <olli@secnetix.de>
2001-04-23 10:01:38 +00:00
Ruslan Ermilov
eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Ruslan Ermilov
2efb80a813 mdoc(7) police: fix markup. 2001-04-18 15:43:06 +00:00
Kris Kennaway
3d09054934 Add fmtcheck(), a function for checking consistency of format string
arguments where the format string is obtained from user data, or
otherwise difficult to verify statically.

Example usage:

printf(fmtcheck(user_format, standard_format), arg1, arg2);

checks the format string user_format for consistency (same number/order/
type of format operators) with standard_format.  If they differ,
standard_format is used instead to avoid potential crashes or security
violations.

Obtained from:  NetBSD
Reviewed by:    -arch
2001-04-17 07:59:52 +00:00
Daniel Eischen
54fd7f685f To be consistent, use the __weak_reference macro from <sys/cdefs.h>
instead of #pragma weak to create weak definitions.  This macro is
improperly named, though, since a weak definition is not the same
thing as a weak reference.

Suggested by:	bde
2001-04-10 04:11:50 +00:00
Ruslan Ermilov
6a5e9ec940 mdoc(7) police: add missing .Pa call. 2001-04-04 09:52:28 +00:00
Peter Wemm
487dbd927f Mostly pick up OpenBSD's rev 1.14 by deraadt@ and millert@.
I've left out a couple of unused args between internal functions.
Use MAXPATHLEN, not MAXPATHLEN + 1 in a couple of places.
Pass a pointer to the end of the target filename space.
2001-03-28 23:55:51 +00:00
Peter Wemm
27d52f6943 OpenBSD's g_Ctoc() returned a false error when the target buffer was
exactly the right size.  Do it differently - pass a length rather than an
end-of-string+1 pointer as this is more convenient anyway.  Get rid of
the bogus +1's.
2001-03-28 10:56:11 +00:00
Peter Wemm
76e2bc010d Fix g_Ctoc() interface, approximately based on OpenBSD's recent changes.
Also, set gl_pathv to NULL after we free it, especially when dealing
with realloc failures.

Obtained from: OpenBSD
2001-03-28 09:53:16 +00:00
Chris Timmons
5c620e2dad Document LOG_CONSOLE. 2001-03-27 19:55:53 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Alfred Perlstein
8f15078110 give the "netgrent" functions a home in netdb.h 2001-03-27 09:49:03 +00:00
Peter Wemm
32e479705a This is kind of a hack, but it should work. Currently, world is broken
because libc/rpc/key_call.c references uname(), and ps/print.c also
defines uname(), and ps is linked statically.  This leads to a symbol
clash.  The userland uname(3) kinda sucked anyway as the hostname
etc was too short.  And since the libc rpc interface now uses
the utsname.nodename which gets truncated, I was tempted into doing
something about it.  Create a new userland uname function, called
__xuname() which takes an extra argument that allows you to change
the size of the fields.  uname() becomes a static inline function
in sys/utsname.h that passes the extra argument in.  struct utsname
has its field members expanded by default now in userland.
We still provide a 'uname' externally linkable function for things
that either think that they ``know'' the utsname format and assume
32 character strings and bypass the include file, or objects that
are linked against old libcs.  ie: just about every plausible
case that I can think of is covered.  Should we ever change the
default lengths again, a libc major bump should not be required
as the size is now passed to the function.

XXX the uname(2) in the kernel is for FreeBSD 1.1 binary compatability!
All the uname(3) functions that are exported to userland are actually
implemented in libc with sysctl.  uname(1) uses sysctl directly and
does not call uname(3).

PR:		bin/4688
2001-03-24 04:40:49 +00:00
Jonathan Lemon
bae8632f82 Introduce the GLOB_MAXPATH flag, which allows the user to limit the
number of paths which glob(3) will return.  Remove the hardcoded limit
from the last commit, which restores the previous unbounded behavior.

Document the new flag in the manual page.
2001-03-19 19:10:06 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Jonathan Lemon
daa4742e72 Bump MAX_GLOBENTRIES up to 16384, so it is a power of two. Add
some comments explaining that this is an arbitrary limit.

Requested by:  jkh
2001-03-16 19:05:20 +00:00
Jonathan Lemon
813c96dbd7 Limit the number of paths that glob can return to MAX_GLOBENTRIES, which
is currently set to 10000.  This is intended to prevent glob from running
amok when a highly recursive path is provided (such as "../*/../*/../*/...")

Reviewed by: Diane Bruce <db@db.net>, jhb
2001-03-15 18:50:32 +00:00
Brian Somers
ad5a84f5eb Mention that MAXHOSTNAMELEN includes space for the NUL. 2001-03-15 08:35:53 +00:00
David Malone
aa9ab917d7 Use the right format string for printing ULONG_MAX. 2001-03-05 11:58:12 +00:00
David E. O'Brien
d2357f9842 Fix style breakage in rev 1.3 2001-03-05 09:33:08 +00:00
David E. O'Brien
8bb47e4083 Fix style bug that was introduced. 2001-03-05 09:21:44 +00:00
Ruslan Ermilov
fdc1fef594 Use ``.St -p1003.[12]''. 2001-02-26 16:12:39 +00:00
Ruslan Ermilov
096841eceb Use ``.St -p1003.1-96''. 2001-02-26 15:16:43 +00:00
Ruslan Ermilov
3d751065b0 `.St -p1003.1b'' -> `.St -p1003.1b-93''. 2001-02-26 14:33:54 +00:00
Ruslan Ermilov
588a200ce1 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
Ruslan Ermilov
52017970cb mdoc(7) police: use .Vt macro. 2001-02-26 09:15:17 +00:00
Ruslan Ermilov
bcdf5ca7c6 Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Daniel Eischen
29ac6bd228 libc MT-safety, part 2.
Add a lock to FILE.  flockfile and friends are now implemented
(for the most part) in libc.  flockfile_debug is implemented in
libc_r; I suppose it's about time to kill it but will do it in
a future commit.

Fix a potential deadlock in _fwalk in a threaded environment.
A file flag (__SIGN) was added to stdio.h that, when set, tells
_fwalk to ignore it in its walk.  This seemed to be needed in
refill.c because each file needs to be locked when flushing.

Add a stub for pthread_self in libc.  This is needed by flockfile
which is allowed by POSIX to be recursive.

Make fgetpos() error return value (-1) match man page.

Remove recursive calls to locked functions (stdio); I think I've
got them all, but I may have missed a couple.

A few K&R -> ANSI conversions along with removal of a few instances
of "register".

$Id$ -> $FreeBSD$ in libc/stdio/rget.c

Not objected to:	-arch, a few months ago
2001-02-11 22:06:43 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Bruce Evans
60babc5565 Don't install links for crypt.3 here. There is no crypt.3 here...
Forgotten in:	rev.1.58, which was not Submitted by: bde (I requested
                untangling parts of the crypto mess).
2001-02-05 14:55:14 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Daniel Eischen
d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
Garrett Wollman
24b11d6ec6 I made a last-minute change before the last commit which broke
the errno semantics.  Get it (closer to) right this time.
2001-01-23 17:36:07 +00:00
Ruslan Ermilov
9715c87b3b mdoc(7) police: replaced empty line with .Pp, updated document date. 2001-01-23 08:41:38 +00:00
Garrett Wollman
08f825912f Add a couple of new library interfaces (will be activated when the
relavant header file changes are committed) for POSIX support.
2001-01-23 04:49:39 +00:00
Kirk McKusick
a9dc3bacfa Add the function sysctlnametomib to libc. Details on the semantics
and use of this function have been added to the sysctl.3 manual page.
2001-01-23 03:40:32 +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
Ruslan Ermilov
32f6256a49 Prepare for mdoc(7)NG. 2001-01-16 09:08:22 +00:00
Ruslan Ermilov
b77b3c00be mdoc(7) police: Ft/Vt now accept punctuation-type arguments. 2001-01-12 15:46:56 +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
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Ben Smithurst
5ff8bb1602 Link stringlist.3 to sl_{add,find,free,init}.3 2000-12-27 20:00:01 +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
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
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
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
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
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
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
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
David E. O'Brien
07a9238fc1 Note that the `fmt' parameter is a printf()-like string. 2000-11-26 23:33:40 +00:00
Ruslan Ermilov
c23155a43a mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
Ruslan Ermilov
725ab6287f log 2000-11-22 09:23:54 +00:00
Sheldon Hearn
067c7f48de Fix hard sentence break introduced in rev 1.7. 2000-11-20 16:25:10 +00:00
Sheldon Hearn
8e770e7803 Add a period missing from rev 1.13. 2000-11-20 16:19:37 +00:00
Sheldon Hearn
3efaff6731 Remove blank line introduced in rev 1.13. 2000-11-20 16:18:45 +00:00
Ruslan Ermilov
563f6bde6e mdoc(7) police: Nm -> Fn where appropriate. 2000-11-20 14:11:46 +00:00
Ruslan Ermilov
3b8ecdbbbe mdoc(7) police: use the new features of the Nm macro. 2000-11-20 14:08:07 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Ben Smithurst
cb17760de7 Remove fullstops from the end of .Xr lines in SEE ALSO section. 2000-11-15 14:40:14 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Sheldon Hearn
b03c558b5a Change [Ii]t's to "It is" and "its" as appropriate. 2000-11-14 07:36:51 +00:00
Sheldon Hearn
d2d9aa87f5 Whitespace only: remove hard sentence breaks introduced in previous
commit and use a paragraph marker (Pp) instead of a blank line.
2000-11-14 07:35:02 +00:00
Jacques Vidrine
0634de0c1f Fix bug introduced in previous commit: users obtained via compat mode
had uid, gid set to 0 if not otherwise specified!

Submitted by:	eivind
2000-11-13 21:22:50 +00:00
Andrzej Bialecki
2de021a4bc Correct description of KERN_PROC. Add description of KERN_PROC_ARGS. 2000-11-11 16:12:30 +00:00
Jacques Vidrine
61a33b7ca5 Fix passwd entry `prototypes' in compat mode. I broke this in revision
1.55 when importing nsswitch from NetBSD.

Reported by:	Naoki Kobayashi <shibata@geo.titech.ac.jp>
2000-11-10 19:11:14 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Jeroen Ruigrok van der Werven
cc5966e584 Correct incorrect information about the PATH used for exec*() calls.
PR:			21990
Partially submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2000-10-30 13:39:23 +00:00
Jeroen Ruigrok van der Werven
5714e85318 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
Mike Pritchard
beb64fb5ac Style & grammar fixes.
PR:		docs/22374, docs/13020
2000-10-28 18:37:37 +00:00
Jacques Vidrine
580ef74769 Explicitly initialize _pw_passwd. 2000-10-27 18:27:07 +00:00
John Polstra
7f244df88e Document RTLD_DEFAULT and the search algorithm used for resolving
undefined symbols.
2000-09-19 04:28:34 +00:00
John Polstra
07f643a52b Make a somewhat unsatisfactory attempt to describe the effects of
the RTLD_GLOBAL and RTLD_LOCAL flags which can be passed to dlopen().
2000-09-19 04:02:05 +00:00
Poul-Henning Kamp
3cea595248 Pickup SPECNAMELEN from <sys/param.h> and use it.
A missing _PATH_DEVDB ("/var/run/dev.db") is not cause for a warning
anymore, the file is effectively optional these days.
2000-09-16 21:58:53 +00:00
Poul-Henning Kamp
8d25eb2c3a Add code to devname(3) so it can find the names of devices which
were not present when dev_mkdb(8) was run.

First the dev_mkdb(8) database is searched, this caters for non-DEVFS
cases where people have renamed a device.

If that fails we ask the kernel using sysctl kern.devname if the device
driver has put a name in the dev_t.  This covers DEVFS cloned devices.

If that also fails we format a string which isn't entirely useless.
2000-09-09 11:39:59 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
Peter Wemm
7aa1d9cd4a Remove the SIGSYS handler and wrapper around the __getcwd() syscall.
It was kinda silly since the sigaction() syscall that it used to setup
the handler is more recent than __getcwd(), therefore it was useless
as the wrapper would have died before even getting as far as __getcwd(2).

Reminded by:	bde
2000-09-05 09:35:36 +00:00
Brian Somers
1357c5d3cc setproctitle() requires unistd.h and not libutil.h/-lutil 2000-09-02 02:25:34 +00:00
Brian Somers
9feac5c218 Move setproctitle() from libutil to libc (after a repo-copy)
and bump __FreeBSD_version to 500012 to mark the occasion.

setproctitle() is prototyped in unistd.h as opposed to stdlib.h
where OpenBSD and NetBSD have it.

Reviewed by: peter
2000-09-02 01:51:36 +00:00
Dag-Erling Smørgrav
1250db8139 Import XPG4-compliant basename(3) and dirname(3) from OpenBSD.
The man pages need some adjustments.

PR:		12960, 12962
Submitted by:	James Howard <howardjp@wam.umd.edu>
Obtained from:	OpenBSD
2000-08-31 15:56:15 +00:00
Brian Feldman
8ca723793a Fix style bugs (including ones introduced from OpenBSD). 2000-08-16 23:37:16 +00:00
Kris Kennaway
8f6d480067 sprintf -> snprintf paranoia 2000-08-04 10:23:42 +00:00
Jason Evans
b167c9a5c1 Make sem_post() safe to call from within a signal handler, as required by
POSIX/SUSv2.
2000-08-01 21:19:09 +00:00
Paul Saab
305ad8f908 If the format string passed to setproctitle begins with a '-'
character, skip the program name when setting the process title.
Ansified with extreme prejudice.

Reviewed by:	peter
2000-08-01 06:37:09 +00:00
Peter Wemm
db3c6b6b22 Add a skeleton rfork_thread(3) man page. 2000-07-29 12:12:39 +00:00
Sheldon Hearn
8072ee08a9 Remove the reference to KERN_UPDATEINTERVAL and syncer(4), since
KERN_UPDATEINTERVAL can't be used to control sched_sync().  In
fact, there's no easy way to control the syncer with sysctls.

Reported by:	bde
2000-07-22 15:36:36 +00:00
Sheldon Hearn
a6b651021d Update stale references to update(4) with references to the new
syncer(4) manual page.
2000-07-19 07:39:08 +00:00
Jason Evans
8e234adf86 Change my email address in the copyright notices for the sake of consistency
(jasone@canonware.com --> jasone@freebsd.org).
2000-07-18 01:38:19 +00:00
Jason Evans
82db3da3e1 Reshuffle the SEE ALSO section.
Prompted by:	sheldonh
2000-07-17 22:33:32 +00:00
John Polstra
59a821dae2 Change the dllockinit() interface from "experimental" to
"deprecated" and warn that it will disappear eventually.
2000-07-08 04:17:28 +00:00
Sheldon Hearn
256dba38d1 Remove trailing whitespace only. 2000-07-03 08:31:02 +00:00
Sheldon Hearn
d72b904079 Fix overlong line and trailing whitespace introduced in rev 1.8. 2000-07-03 08:28:30 +00:00
Sheldon Hearn
c50c83c0e1 Add to the SEE ALSO section, a reference to the RFC mentioned in
text introduced in the previous commit.
2000-07-03 08:26:50 +00:00
Brian Feldman
a9e2722c58 Re-pair the MLINKS of unvis.3 with strunvisx.3. This undoubtedly was a
world breakage.
2000-07-03 05:21:43 +00:00
Alexander Langer
0b1c18e4cf Add strunvisx.3 MLINK. 2000-07-02 21:45:16 +00:00
Alexander Langer
d8fa6babb4 Document VIS_HTTPSTYLE:
VIS_HTTPSTYLE is a new encoding style for use in vis(), strvis() and
  strvisx() that escapes characters according to RFC 1808 (URI encoding).

Since decoding of these require different detection of start-points of
  escaped characters, VIS_HTTPSTYLE can be given as flag to unvis().
  unvis() will then properly decode URIs.

A new function appeared, strunvisx(): strunvisx() behaves similar as
  strunvis(), with one exception: It has an additional flag parameter,
  which is passed to unvis() to archive the effect I described above.
2000-07-02 21:31:26 +00:00
Dan Moschuk
d81584ae91 Style fixes. 2000-07-01 17:49:34 +00:00
Dan Moschuk
e63a7af508 Add URI encoding to the vis/unvis routines courtesy of VIS_HTTPSTYLE.
Since alex is a -doc committer, he can update his own manpage. :-)

Also add $FreeBSD$ while I'm here.

Submitted by: alex
2000-07-01 15:55:49 +00:00
Jason Evans
b79702feff Fix typo in SEE ALSO section. 2000-06-28 03:15:21 +00:00
Josef Karthauser
1246bf7279 Remove the setflags/getflags routines. Their functionality has
been replaced with the library calls fflagstostr and strtofflags.
2000-06-18 20:10:41 +00:00
Josef Karthauser
c5bb91d1b2 Add strtofflags and fflagstostr to libc. 2000-06-17 11:55:57 +00:00
Josef Karthauser
8c7bdc130e Modify strtofflags so that it returns a malloced string instead of a
pointer to a static buffer.
2000-06-17 11:09:24 +00:00
Josef Karthauser
d502d9ac46 The "def" arg for fflagstostr is too specialized for ls. The caller
can easily translate from "" to whatever it wants to print if no
flags are set.  (ls prints "-" and mtree prints "none".)

Suggested by:	bde
2000-06-17 01:43:56 +00:00
Josef Karthauser
b81eeaf0a6 Return of the evil file flags! The {s|g}etflags functions were
renamed to {s|g}etflagsbyname, which received objections.   They're
now called strtofflags (string to file flags) and fflagstostr (file
flags to string).

Suggested by:	bde
2000-06-17 01:28:13 +00:00
Kris Kennaway
6641555f44 #include <string.h> for memcpy() prototype
Obtained from:	OpenBSD
2000-06-03 00:27:54 +00:00
Guy Helmer
b4183771fd Describe errx/warnx in comparison to errc/warnc/err/warn.
Use .Fa instead of .Va for function arguments.

Reviewed by:	sheldonh
2000-05-23 19:52:35 +00:00
Tim Vanderhoek
8187dd1c8b Fix a memory leak in getent() that occurred when the requested entry
could not be found.

PR:		bin/17084
2000-05-21 02:55:09 +00:00
Alexey Zelkin
03fc63031e Use `Er' variable to define first column width in ERRORS section. 2000-05-06 12:07:59 +00:00
Alexey Zelkin
96e430a43c mdoc related cleanup:
. use construction ".Aq Pa filename" instead of ".Pa <filename>"
. replace Section Heading macro (.Sh) with Subsection (.Ss) macro for
subsections
2000-05-06 12:05:39 +00:00
Alexey Zelkin
95010bdc53 Use suggested by mdoc(7) style section name (ERROR -> ERRORS) 2000-05-06 12:02:18 +00:00
Mike Pritchard
751f44657e Minor mdoc cleanup.
PR:		docs/13218
2000-05-05 02:21:45 +00:00
Jason Evans
51289fd6db Remove cancellation point propagation. 2000-04-26 23:17:17 +00:00
Garrett Wollman
d166947eda Spell MAP_NOSYNC correctly.
Submitted by:	allenc@verinet.com
2000-04-23 15:15:15 +00:00
Garrett Wollman
c1c8bf8375 .Lb-ify 2000-04-23 02:02:33 +00:00
Alexey Zelkin
3dc329d1be Introduce .Lb macro to libutil manpages
Sort .Nm values in some manpages
Remove explicit note about compiling with -lutil, it's implicitly
declared by .Lb macro now.
2000-04-22 16:17:00 +00:00
Alexey Zelkin
d8a7868820 Introduce .Lb macro to libc_r manpages. 2000-04-22 15:50:29 +00:00