Commit Graph

1297 Commits

Author SHA1 Message Date
Giorgos Keramidas
678a5ffdd8 Mark up SIGSTOP with .Dv and use .Nm in HISTORY for marking up `signal'.
PR:		docs/75615
Submitted by:	n-kogane@syd.odn.ne.jp
2004-12-29 19:40:56 +00:00
Gleb Smirnoff
8ba85e7741 Restore standard behavior: log to console only when normal logging
failed, not always.

PR:		bin/75356
Submitted by:	Mark Knight <markk knigma org>
Pointy hat to:	glebius
MFC after:	3 days
2004-12-24 09:48:44 +00:00
Joseph Koshy
6e6bc3ed0d Better rendering of the prototype for signal(3).
Suggested by:	ru
2004-12-23 02:48:20 +00:00
Maxim Konovalov
63173f5f56 o The macro versions of sigemptyset(3), sigfillset(3), sigaddset(3),
sigdelset(3) and sigismember(3) were killed about five years ago.

o The functions (specifically sigismember(3)) could return -1 and
set errno.

PR:		bin/75156
Obtained from:	NetBSD
MFC after:	2 weeks

o Bump the date of the document.
2004-12-16 20:27:55 +00:00
Ralf S. Engelschall
b4c6be3254 Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".

MFC after:	3 days
2004-12-03 14:10:04 +00:00
Mark Santcroos
15579150a4 Remove ntp_gettime.c which was a wrapper around sysctlbyname(3).
This is now a native system call.

Reviewed by:	imp, phk, njl, peter
Approved by:	njl
2004-11-18 23:59:19 +00:00
Bjoern A. Zeeb
6c58990d47 Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
Gleb Smirnoff
240d5a9b1c Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).

- Make syslogd open an additional socket /var/run/logpriv, with 0600
  permissions.
- In libc, try to use this socket.
- Do not loop forever if we are using this socket (partial backout of 1.31)

Reviewed by:	dwmalone, Andrea Campi <andrea webcom it>
Approved by:	julian (mentor)
MFC after:	1 month
2004-11-04 23:09:57 +00:00
Gleb Smirnoff
2e89951b6f When send()ing to syslogd return ENOBUFS keep trying until success.
This fixes a case, when DoSed syslogd completely loses messages.

PR:		bin/72366
Discussed with:	dwmalone, millert@OpenBSD.org
Approved by:	julian (mentor)
Obtained from:	OpenBSD (rev. 1.17, 1.21 by millert)
MFC after:	3 months
2004-10-08 21:15:21 +00:00
Joseph Koshy
6febaa3aff Mutually cross-reference sysexits(3) and err(3). Add text to err(3)
recommending that the standard exit codes in sysexits(3) be used.

Reviewed by:    ru
2004-10-04 14:04:37 +00:00
David Schultz
48c8620ae4 Remove __isnanl() to avoid conflicting with the same function in libm.
__isnan() and __isnanf() must remain in libc for hysterical raisins.
On the other hand, __isnanl() must live in libm because libm uses it
internally and can't depend on older versions of libc to provide it.
Fortunately, we don't need __isnanl() in both libraries.

Prodded by:	ale
PR:		71698
MT5 candidate
2004-09-24 06:33:22 +00:00
Olivier Houchard
9e3a79d517 Arbitraly choose the Variant II for arm. 2004-09-23 23:14:09 +00:00
Tim J. Robbins
b37ff7a592 Septepber -> September
Noticed by:	ru
2004-09-01 23:28:27 +00:00
Tim J. Robbins
e6e1974ba5 Back out the previous change. glob() still does use strcmp() to order
pathnames.
2004-09-01 11:02:55 +00:00
Tim J. Robbins
1fd0f50a3a Add cross-reference to ftw(3). 2004-08-29 06:39:58 +00:00
Tim J. Robbins
e1bcce4f46 Replace the current implementations of ftw() and nftw() with the OpenBSD
implementations written by Todd C. Miller. These are cleaner, less buggy
and actively maintained.
2004-08-24 13:00:55 +00:00
Doug Rabson
bd41e9ea59 Make sure we allocate at least enough space for the TCB for variant I TLS.
MFC after: 3 days
2004-08-23 15:30:05 +00:00
Tim J. Robbins
9777e82e42 Update documentation to match reality: glob() sorts its result according
to the current LC_COLLATE setting, not in "ASCII order".

PR:		54391
MFC after:	1 week
2004-08-23 12:10:44 +00:00
Doug Rabson
0e7e4e5fd6 Always allocate a TLS area even if its empty - libpthread relies on
having a valid %gs when it initialises.

MFC after: 2 days
2004-08-18 10:18:58 +00:00
Doug Rabson
ccd13c49b5 Add support for TLS in statically linked programs. 2004-08-15 16:18:52 +00:00
Stefan Farfeleder
4eae39bfdf Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
Doug Rabson
0e1c7d0f08 Add stubs for TLS functions. These will be replaced at runtime by the
functional versions in rtld.
2004-08-03 08:54:01 +00:00
Stefan Farfeleder
3103c94843 Remove an implicit int parameter by using prototypes. 2004-08-02 08:46:23 +00:00
Stefan Farfeleder
44a35598ff Don't pass function pointers via a void * parameter. 2004-08-02 08:18:43 +00:00
Alexander Kabaev
132cc0756e Use newly added __used attribute to keep static function symbols from being
eliminated by compiler optimizer.
2004-07-29 18:07:08 +00:00
Tim J. Robbins
e9346e012d Add support for multibyte characters. 2004-07-29 03:48:52 +00:00
Tim J. Robbins
9a9aa3ffa1 Add a paragraph break in the STANDARDS section to improve readability. 2004-07-29 03:41:24 +00:00
Tim J. Robbins
9d88e27007 Add support for multibyte characters. 2004-07-29 03:13:10 +00:00
Tim J. Robbins
f825dd29c2 Document incorrect handling of multibyte characters due to limitations
of sh(1).
2004-07-28 15:43:33 +00:00
Dag-Erling Smørgrav
7688459683 ANSIfy and constify; this now builds with GCC 3.4. 2004-07-28 11:56:03 +00:00
Tim J. Robbins
16018100a7 Add an nftw(3) link. 2004-07-25 11:17:54 +00:00
David Schultz
9b5f005228 Remove unused variable.
Noticed by:	Todd Miller <Todd.Miller@courtesan.com>
2004-07-23 06:01:00 +00:00
David Schultz
ec79bc0da9 Fix two bugs in the signbit() macro, which was implemented last year:
- It was added to libc instead of libm.  Hopefully no programs rely
  on this mistake.

- It didn't work properly on large long doubles because its argument
  was converted to type double, resulting in undefined behavior.
2004-07-19 08:16:10 +00:00
David Schultz
39bcea8689 Replace seven nominally MD implementations of frexp() that are broken
for subnormals with one implementation that works.
2004-07-18 21:23:39 +00:00
Tim J. Robbins
ad3d799334 Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.

PR:	57911 (related)
2004-07-18 10:11:27 +00:00
Tim J. Robbins
613e383e81 Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.

PR:	57911
2004-07-18 06:56:40 +00:00
Tim J. Robbins
ad19b09bec Fix typo: carat -> caret. 2004-07-17 12:27:25 +00:00
Marcel Moolenaar
f5eda2f1cb Unbreak alpha: On alpha a long double is the same as a double and
consequently the exponent is only 11 bits. Testing whether the
exponent equals 32767 in that case only effects to compiler warnings
and thus build breakage.
2004-07-10 15:52:26 +00:00
David Schultz
ad93428d7a Bump document date for recent changes.
Prodded by:	ru
2004-07-09 06:37:44 +00:00
David Schultz
3bdf026534 Document these functions as being in libm, not libc. Some of them
*are* in libc for historical reasons, but programmers should not rely
on that fact.

Also remove a BUGS section that is not relevant here.
2004-07-09 03:33:00 +00:00
David Schultz
240dbabfa8 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
Ruslan Ermilov
1c5f1e7afd Fixed markup. 2004-07-07 20:11:35 +00:00
David Schultz
b03b864ac9 Add implementations of ftw(3) and nftw(3) and the corresponding header
ftw.h.  This is the implementation written by Joel Baker
<fenton@debian.org> for inclusion in NetBSD, but with several
bugfixes.

Obtained from:	Debian
2004-07-05 23:13:16 +00:00
David Schultz
c8f7bbe36b Documentation for ftw(3) and nftw(3).
Obtained from:	OpenBSD
2004-07-05 23:12:11 +00:00
Ruslan Ermilov
51f98e585b Fix the NAME section making whatis(1) happy in particular. 2004-07-05 17:12:53 +00:00
Ruslan Ermilov
30950a21e1 Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Ruslan Ermilov
26b6c45a92 Markup tidying. 2004-07-02 16:45:56 +00:00
Ruslan Ermilov
33992dc0ed Markup, grammar, and spelling fixes. 2004-06-30 20:09:10 +00:00
Tim J. Robbins
b7114d4a9c Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.
Noticed by:	Stoned Elipot
2004-06-30 13:55:08 +00:00
Mike Pritchard
811815574d Spelling fixes. 2004-06-21 19:30:45 +00:00
David Schultz
1e03bff7f2 In fts_build(), if we try to chdir and fail (e.g. due to lack of search
permission), try to continue in FTS_DONTCHDIR mode.  Of course this
won't work for long paths, but we can't descend more than one pathname
component beyond the directory anyway if we lack search permission.

Here is a transcript demonstrating the change, where oldls is ls(1)
linked with the old fts(3):

	das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t
	das@VARK:~> oldls t
	a       b       c
	das@VARK:~> oldls -l t
	das@VARK:~> \ls t
	a       b       c
	das@VARK:~> \ls -l t
	ls: a: Permission denied
	ls: b: Permission denied
	ls: c: Permission denied

I had forgotten about this patch until bde reminded me.  He reports
using it without problems for over a year.

PR:	45723
2004-06-08 06:23:23 +00:00
Yaroslav Tykhiy
35641ec00f Finally document the option to avoid zombie creation
through ignoring SIGCHLD.
2004-06-07 11:01:39 +00:00
Peter Pentchev
c56864a7a7 Fix the ordering in the description of the dlsym() lookup procedure to
reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded
objects (RTLD_GLOBAL) are searched before the local object's DAG's.

PR:		62770
Submitted by:	Kimura Fuyuki <fuyuki@nigredo.org>
2004-06-03 10:13:26 +00:00
Tim J. Robbins
95a535af6d Change the signature of ftok from (const char *, char) to (const char *, int)
Obtained from:	NetBSD (christos)
2004-06-01 06:53:07 +00:00
Yaroslav Tykhiy
d0080709e7 Clarify and extend paragraphs on interoperation
of fcntl(2), flock(2), and lockf(3) advisory locks.
Add such a paragraph to the flock(2) manpage for the
sake of consistency.

Reviewed by:	Cyrille Lefevre and Kirk McKusick on -arch
MFC after:	2 weeks
2004-05-17 23:09:10 +00:00
Tim Kientzle
9b8f137b2d getgrent() and friends should set errno if there is an error.
Also, clarify the manpage description of when errno is set and
explain that clients should set errno=0 first if they want useful
error information.
2004-05-17 22:15:49 +00:00
Tim Kientzle
5edb850fbe POSIX prohibits any library function from setting errno to 0.
Correct my previous commit and add a comment to the manpage
indicating that the user must set errno to 0 if they wish to
distinguish "no such user" from "error".

Pointed out by: Jacques Vidrine (nectar@)
2004-05-17 18:27:05 +00:00
Tim Kientzle
b4cc8687ad If getpwent/getpwuid/getpwnam return NULL, they must also set errno. 2004-05-17 06:17:59 +00:00
Bruce Evans
a1acdbf008 Fixed some minor style bugs. 2004-05-13 15:59:38 +00:00
Peter Edwards
07dee1a777 Fix some^Wseveral style bugs from last commit.
Remove "sys/types.h" as "sys/param.h" is already included

Use cast rather than back-pointer to convert from public to private
version of FTS data, and so avoid littering fts.h with any of the
details.

Pointed out By: bde, kientzle
2004-05-12 21:38:39 +00:00
Diomidis Spinellis
857b57eae1 Remove a trailing newline, to behave as documented in syslog(3):
"A trailing newline is added if none is present."

The code in syslogd, stderr, and console output always adds a newline
at the EOL.  However, the existing code never actually removed a
trailing newline, and apparently relied on syslogd to convert it
into a space character.  Thus, the existing newline was converted
to a trailing space at the EOL by syslogd, while stderr, and console
output resulted in an empty line.

MFC after:	2 weeks
2004-05-10 17:12:52 +00:00
Bruce Evans
d98d9ce623 Fixed style bugs in previous commit (bogus forward declaration and
inconsistent capitalization in comments).
2004-05-10 09:36:26 +00:00
Christian Brueffer
b17e85fede o fix a sentence to match with the synopsis [1]
o fix grammar nit

PR:		66289 [1]
Submitted by:	Michel Lavondès <fox@vader.aacc.cc.md.us>
Obtained from:	OpenBSD [1]
MFC after:	3 days
2004-05-09 11:11:21 +00:00
Peter Edwards
99ca5b8804 The FTS_NOSTAT option is an optimisation that reduces the number
of stat(2) calls by keeping an eye of the number of links a directory
has. It assumes that each subdirectory will have a hard link to its
parent, to represent the ".." node, and stops calling stat(2) when
all links are accounted for in a given directory.

This assumption is really only valid for UNIX-like filesystems: A
concrete example is NTFS. The NTFS "i-node" does contain a link
count, but most/all directories have a link count between 0 and 2
inclusive. The end result is that find on an NTFS volume won't
actually traverse the entire hierarchy of the directories passed
to it. (Those with a link count of two are not traversed at all)

The fix checks the "UFSness" of the filesystem before enabling the
optimisation.

Reviewed By: Tim Kientzle (kientzle@)
2004-05-08 15:09:02 +00:00
Tim Kientzle
542fc1042b A minor refactoring to simplify portability: assign the filename
length to a separate variable so that it will be easier to adapt to
systems that don't have d_namlen in struct dirent.
2004-05-05 06:33:00 +00:00
David Schultz
38d17374b2 When *printf() and *scanf() are compiled without floating-point
support, fmtcheck() should not accept format strings that contain
floating-point formats.
2004-05-02 10:55:05 +00:00
Ruslan Ermilov
d1ec91e353 Markup nit. 2004-04-27 09:18:49 +00:00
Jonathan Chen
dbb4b1c83d Fix a bug that could result in getpw*() incorrectly returning NULL when NIS
adjunct maps are used.  One symtom of this bug is sshd saying:
	login_get_lastlog: Cannot find account for uid X
when logging in.  The problem here is caused by an incorrect reuse of the rv
variable when previous values are needed later.
2004-04-21 21:15:08 +00:00
Maxime Henrion
4af6b50978 Belatedly remove the getvfsent(3) API. All the consumers have been
updated to use getvfsbyname(3) or the vfs.conflist sysctl since a
long time, except mount_smbfs(8) which has just been fixed.
2004-04-11 21:36:31 +00:00
Tim J. Robbins
7937c23d49 Terminate execl()'s argument list with a null pointer instead of a
null pointer constant. (The latter may be an integer constant, which
is not correct here.)

Submitted by:	Stefan Farfeleder
2004-04-09 11:32:32 +00:00
Bruce M Simpson
3b367e998f Document the existence of NET_RT_IFMALIST.
Reviewed by:	ru
2004-03-25 10:08:46 +00:00
Ruslan Ermilov
f8a89f622e [troff] removed the unnecessary use of \_ escapes. 2004-03-25 09:25:24 +00:00
Brian Feldman
5295209eff Add locking so that arc4random(3) functions are all reentrant for
pthreads.

Submitted by:	Christian S.J. Peron <maneo@bsdpro.com>
2004-03-24 14:44:57 +00:00
Tim J. Robbins
8e6b7161d3 Document incorrect handling of multibyte characters. 2004-03-21 11:31:37 +00:00
Don Lewis
c947dc059b Document additional reasons that sysctl(3) can return ENOMEM (due to
vslock() failure).
2004-03-15 10:32:37 +00:00
Mark Murray
16fc3635f7 Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
Brian Feldman
7ce21b2023 Apply style(9).
Submitted by:	"Christian S.J. Peron" <maneo@bsdpro.com>
PR:		bin/63283
2004-02-23 20:42:03 +00:00
Josef El-Rayes
474f8512ae Add signal numbers to signal(3).
Approved by:    simon(mentor)
Reviewed by:    ru
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             docs/60044
2004-02-23 13:20:03 +00:00
Colin Percival
3c754d8be1 style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags at the start of the file
(incorrect, removed), and after the copyright
notices (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:40:17 +00:00
Daniel Eischen
e3b4bf9411 Prevent memory leak on sem_destroy() by destroying the semaphore's
internal mutex and CV.
2004-02-06 15:15:44 +00:00
Daniel Eischen
e7f1524858 Only allow the semaphore to be taken when the value is positive.
Don't decrement it twice when it is taken.

Reported by:	kris
2004-02-06 13:54:38 +00:00
Daniel Eischen
08a6a888da Correct check for invalid semaphore on sem_destroy() (s/==/!=/).
Reported by:	kris
2004-02-05 23:32:45 +00:00
Daniel Eischen
3962ef4305 Correct the weak reference for sem_unlink. 2004-02-05 22:36:27 +00:00
Daniel Eischen
903f2e5041 Allow libc's version of sem_trywait() to work for non-pshared mutexes. 2004-02-04 15:37:48 +00:00
Daniel Eischen
5c70dac879 Modify the implementation of libc semaphores so that they can be
overridden by the threads library to provide a userland version
of non-pshared semaphores and cancellation points.  Also add
a sem_timedwait().

The libc version of semaphores always uses kernel semaphores
regardless of whether pshared is set or not.  When threads are
not present, it is difficult to get sem_wait() or sem_timedwait()
to do the right thing (since pthread_cond_timedwait() and
pthread_cond_wait() are stubs in libc and just return immediately).
2004-02-03 05:47:19 +00:00
David Schultz
60ce8b0e07 Discard the first 1024 bytes of output as suggested by
http://citeseer.nj.nec.com/fluhrer01weaknesses.html and
http://citeseer.nj.nec.com/531224.html .

PR:		61126
Submitted by:	Jeff Ito <jeffi@rcn.com>
2004-01-20 04:22:47 +00:00
Philippe Charnier
c4fe9d664a add missing endusershell() call. Original version was incorrect.
PR: bin/2442
Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>
2004-01-18 21:33:25 +00:00
David Xu
b6897522fa Backout revision 1.6, because some stub functions not in libc, and
non-threaded won't build. The cancellation point support should be
further discussed.
2004-01-17 07:15:06 +00:00
David Xu
cc3782cbc7 Enable cancellation point in sem_wait, it is required by POSIX.
For pshared semaphore, this commit still does not enable cancellation
point, I think there should be a pthread_enter_cancellation_point_np
for libc to implement a safe cancellation point.
2004-01-17 02:45:37 +00:00
Ruslan Ermilov
bbeec6eeb0 Fixed style of previous commit.
Submitted by:	bde
2004-01-15 17:27:28 +00:00
Ruslan Ermilov
fccedf067d - libc/sys/sem.c was repocopied to libc/gen/sem.c.
- sem_*(3) manpages were repocopied from libc_r.

Reviewed by:	deischen
Repocopy by:	markm
2004-01-14 20:54:16 +00:00
Jacques Vidrine
3beb62d3d6 Kill whitespace at end of lines. 2004-01-12 13:33:24 +00:00
Jacques Vidrine
2734a36f06 Fix a bug that could result in a null pointer dereference in
getpwent(3) or getpwuid(3) when using NIS adjunct maps.  The bug was
present in the internal `nis_passwd' function.  The lookup in the
adjunct map used the name passed into `nis_passwd', however no name
was of course supplied by getpwent or getpwuid.  Correctly use the
name from the `struct pwd' that was found instead.

PR:		bin/59962
Submitted by:	Gabriel Gomez <ggomez@fing.edu.uy>
2004-01-12 13:29:54 +00:00
Jacques Vidrine
84d9142f58 Remove unused variables and function declarations. Add missing headers. 2004-01-06 18:26:15 +00:00
Doug Rabson
4da7d0f5dd Make sure we initialise dirp->dd_size if we aren't reading a unionfs
directory.

Special thanks to: valgrind
2003-12-26 12:00:46 +00:00
Tom Rhodes
f2eeb0218f Back out previous commit due to incorrect content.
Noticed by:	wollman
2003-12-23 18:42:55 +00:00
Tom Rhodes
a0137e7055 Document many of the missing posix.1b options.
PR:		20528
Submitted by:	bms (original version)
Requested by:	mike (awhile ago)
2003-12-23 17:29:35 +00:00
Diomidis Spinellis
434c74760f Fix problem where initgroups would silently truncate groups with
more than NGROUP elements without providing the opportunity to
setgroups to fail and correctly return error and set errno.

MFC after:	2 weeks
2003-11-19 15:51:26 +00:00
Guy Helmer
ffcdc34769 Remove ',' accidentally added after ".Xr fork 2". 2003-11-10 22:04:51 +00:00
Guy Helmer
8b2b22e84d Prevent abnormal termination of a child daemon process when created
by a parent that is a session leader (e.g., login shell) by ignoring
SIGHUP in before calling fork(2) and then restoring SIGHUP's action
after setsid(3).  Based on the patch by Martin Kammerhofer
<mkamm@gmx.net>.

PR:		bin/25462
Reviewed by:	bde, alex.neyman@auriga.ru
2003-11-10 22:01:42 +00:00
Tim Kientzle
42944f1e2e Rephrase .Nd description to contain the key
words "pattern" and "test"; this should make it easier
to find with "man -k"

Approved by: gordon (mentor)
2003-11-06 00:52:37 +00:00
Poul-Henning Kamp
b778a32374 Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree. 2003-10-30 12:41:50 +00:00
Poul-Henning Kamp
347fb1d46e Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magic
characters '*', '?' and '['.
2003-10-30 10:40:49 +00:00
Tim J. Robbins
4539e95a0f Remove incomplete support for running FreeBSD userland on old NetBSD kernels
lacking the issetugid() and utrace() syscalls.
2003-10-29 10:45:01 +00:00
Ruslan Ermilov
a1de21c12e mdoc(7): Fix common mistakes made in the SEE ALSO section. 2003-09-12 21:54:11 +00:00
Ruslan Ermilov
743d5d518c mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Eivind Eklund
62d6317d5a Update the kern.osreldate documentation to document the present format
used, and refer to <osreldate.h> to get userland date.

Submitted by:	ru
2003-09-01 14:26:33 +00:00
Garrett Wollman
89a26fd1fc Add a kluge suggested by Marcel to paper over the difference between
gethostname()'s old and new signatures without requiring a library
bump.  Note that programs which called gethostname() with a negative
argument were already broken, since the same type conversion was done
by the old implementation.  Add a note in the Makefile so that whoever
next bumps the libc revision will delete the kluge at the same time
(as it will no longer be necessary).  This is only operative on 64-bit
platforms.

Submitted by:	marcel
2003-08-19 23:01:46 +00:00
Garrett Wollman
effcb5eca3 Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEM
when the buffer is not long enough to hold the current host name.
POSIX does not standardize error returns for gethostname(), so it
doesn't matter which one we use, but ENAMETOOLONG is at least a little
more intuitive, and mi suggests the existence of prior art.  I've been
running with this change for a while on my home machine with no
effect.  At the same time, I've updated the prototype for
gethostname() to use the correct standard type (size_t) for the
namelen argument.

All of the in-tree callers fall into one of the following categories:
1) Call perror() or equivalent when gethostname() fails.
2) Ignore gethostname()'s return value entirely, potentially resulting
in data corruption if the buffer is too small.
3) Fall back to a (possibly sensible) default value if gethostname()
fails.

Many of the callers I examined shows signs of confusion about the
correct sizing of the host name buffer.  gethostname(3) now has more
information about this, as well as updated standards information.

PR:		48114
Submitted by:	mi (in part)
2003-08-19 20:38:44 +00:00
Bruce M Simpson
662d85d6a2 Add the POSIX 1003.1-2001 posix_madvise() interface.
PR:		standards/54634
Reviewed by:	das
Approved by:	jake (mentor)
2003-08-09 03:23:24 +00:00
David Schultz
05e1bf3461 The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1. 2003-07-31 06:18:24 +00:00
David Xu
5e27d6ab96 Make raise and _raise as weak symbols, so they can be overriden by
thread library.

Reviewed by: deischen
2003-07-19 05:22:56 +00:00
Garrett Wollman
157c8e69d7 Rewrite to reflect slight change in semantics for C99, and note a bug
in the standard.  Defer to gettimeofday(2) for error indications.
2003-07-19 03:19:59 +00:00
Garrett Wollman
d09b896215 C99 compliance: time() always sets its return value in both places
(if present), even on error.

Pointed out by: Wojtek Lerch, on the Austin Group mailing-list
2003-07-19 02:53:46 +00:00
Bill Paul
0287aa1cee Revert to using yp_order() to probe for master.paswd.by* maps and
don't probe the server at all for passwd.by* maps. This fixes
interoperability with the Services For UNIX NIS server (which is
really a front end to Captive^WActiveDirectory). This server
incorrectly returns success for all YPPROC_MASTER requests,
even for maps that don't exist, which makes it impossible to
(ab)use it to probe for the existence of the master.passwd.by*
maps.

This is a little kludgey, but basically restores the original
behavior of getpwent.c as it is in -stable, and works around both
the lack of YPPROC_ORDER on NIS+ servers as well as the broken
YPPROC_MASTER on Services For UNIX servers.
2003-07-18 23:51:15 +00:00
Garrett Wollman
def6489df6 Whitespace after keywords per style(9). 2003-07-18 16:04:32 +00:00
Ruslan Ermilov
b6f8b339d3 With the latest mdoc(7), we can now fix the synopsis like this.
Desired by:	bde
2003-07-03 18:14:39 +00:00
Bruce Evans
270f6e44db Fixed some style bugs. 2003-07-01 12:30:03 +00:00
Alfred Perlstein
9470460d7a Don't segfault if setproctitle(3) is called with NULL initially.
The old buffer was not being initialized and a later str*() op on
it would cause a crash if it wasn't initialized by a previous
call to setproctitle(3) with an actual string.

Noticed by: Ashley Penney <ashp@unloved.org>
2003-07-01 09:45:35 +00:00
Gordon Tetlow
09f49aab84 Add a libc function execvP that takes the search path as an arguement.
Change execvp to be a wrapper around execvP. This is necessary for some
of the /rescue pieces. It may also be more generally applicable as well.

Submitted by:	Tim Kientzle <kientzle@acm.org>
Approved by:	Silence on arch@
2003-06-29 17:33:34 +00:00
David Schultz
ec045e41d9 Teach fmtcheck(3) about the flags a, A, F, G, t, and z. 2003-06-29 01:11:31 +00:00
John W. De Boskey
788940b418 fix NIS+ YP compat mode
PR:		bin/52792
Submitted by:	TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
2003-06-27 03:37:44 +00:00
Andrey A. Chernov
ba10c47105 Don't statically initialize buf to _PATH_DEV, _PATH_DEV always copied to
it in any case.
2003-06-24 22:20:06 +00:00
Yaroslav Tykhiy
f8193a054c Supplement the cross-references section with those to sigpending(2)
and sigprocmask(2).  These two syscalls are likely to be accompanied
by a few sigsetops(3) in a typical piece of code.
2003-06-24 15:27:31 +00:00
Poul-Henning Kamp
97679e71b0 ttyname(3) must return absolute pathnames.
Noticed by:	kris
2003-06-21 08:16:12 +00:00
Poul-Henning Kamp
e7acddfdef Use devname(3) to do the task.
Reviewed by:	imp
2003-06-20 22:45:53 +00:00
Poul-Henning Kamp
529ac58781 Add devname_r(3) which takes a buffer as argument. 2003-06-20 09:52:27 +00:00
Ruslan Ermilov
19c2ee9e5f Make the execle() synopsis look (again) like a normal C prototype.
Also fixed the rest of ell (list) functions prototypes to include
a (commented out) terminating null pointer.

Pointed out by:	bde
Obtained from:	POSIX.1-2001
Glanced at by:	imp
2003-06-18 15:24:21 +00:00
Poul-Henning Kamp
bbaba031a5 Fix the execle(3) synopsis to include the environment pointer.
Confused:	anordby
2003-06-17 08:57:37 +00:00
Philippe Charnier
ab165955de The .Fn function 2003-06-08 10:13:50 +00:00
Philippe Charnier
0d511e328f Add or correct section number in .Xr. Use .Vt or .Fn
instead of .Xr when needed
2003-06-08 10:01:52 +00:00
Poul-Henning Kamp
c6dd496cd9 Recognize the magic NODEV value.
Format other unknown devices consistently in hex.
2003-06-05 21:55:57 +00:00
Juli Mallett
d7ea49283c Match style of source and headers.
Submitted by:	bde
2003-06-01 21:35:27 +00:00
Ruslan Ermilov
0e35e492fc Assorted mdoc(7) fixes. 2003-06-01 19:19:59 +00:00
Juli Mallett
283d23cbba Make prototype match code with regard to constness of args to the
function pointer passed in.
2003-06-01 06:43:39 +00:00
Alexander Kabaev
8c22e2f77b Add an stub for _rtld_thread_init. This is a part I missed in
my last commit.

Approved by:	re (scottl)
2003-05-30 00:58:37 +00:00
Ruslan Ermilov
3a5146d9e2 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
Ruslan Ermilov
aba60fa66b Fixed troff(1) and mdoc(7) warnings.
Approved by:	re (blanket)
2003-05-18 21:05:22 +00:00
Tim J. Robbins
6e7988b9c5 Catch up with the renaming of the "union" filesystem to "unionfs".
Fixes a problem where directory entries could show up twice: once
on the top layer of the union stack, and once on the bottom layer.

Approved by:	re (rwatson)
2003-05-16 02:15:07 +00:00
Tom Rhodes
a460614661 Use the .Dl macro.
Discussed with:	mdoc(7) officer ru
2003-05-01 20:27:59 +00:00
Tom Rhodes
7b98ad3005 State the fact that the range is twice the traditional RAND_MAX.
Add an EXAMPLES section.

PR:		48493
Submitted by:	Paul Herman <pherman@frenchfries.net> (original version)
2003-05-01 19:09:16 +00:00
Jacques Vidrine
d05090827f Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
2003-05-01 19:03:14 +00:00
Jacques Vidrine
5723e501ab `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by:	qpopper's interfering and buggy version of strlcpy
2003-04-29 21:13:50 +00:00
Robert Drehmel
da0db726f7 Replace the return value of rfork_thread(3) in its manual page
function prototype with `pid_t' to match the declaration in
<unistd.h>.
2003-04-27 21:07:27 +00:00
Jacques Vidrine
c14d379de1 When using `compat' mode, be sure to re-dispatch setpwent, endpwent,
setgrent, and endgrent also.  (The previous NSS implementation used to
simply twiddle the internal data of the various modules directly.)

A symptom (group list set incorrectly in sshd) was
Reported by:	Glenn Johnson <gjohnson@srrc.ars.usda.gov>

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-25 18:25:19 +00:00
Jacques Vidrine
e2527daf1a In compat mode, we `redispatch' the lookup. It is probably a good
idea to re-initialize `struct passwd', because e.g. pw_class might
get set by one module, but not by another.  Add another call to the
internal pwd_init function to accomplish this.

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-24 23:56:58 +00:00
Jacques Vidrine
0030cba4aa Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by
namespace.h.

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-24 20:16:21 +00:00