Commit Graph

2893 Commits

Author SHA1 Message Date
Ruslan Ermilov
936c7c034e mdoc(7) police: remove whitespace at EOL. 2001-08-08 10:28:18 +00:00
Ruslan Ermilov
71b67d931a mdoc(7) police: markup nits. 2001-08-08 08:51:03 +00:00
Peter Wemm
20f9910b18 Update ptrace(2) re: PT_READ_U and PT_WRITE_U 2001-08-08 05:28:09 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Ruslan Ermilov
44220250d0 mdoc(7) police: sort xrefs. 2001-08-07 12:33:11 +00:00
Ruslan Ermilov
f61004566c mdoc(7) police: markup nits. 2001-08-07 12:17:32 +00:00
Dima Dorfman
557b792532 varargs -> stdarg 2001-08-05 05:39:16 +00:00
Bruce Evans
a7dff00b1e Don't clobber the default for CFLAGS. 2001-08-03 21:45:54 +00:00
Ian Dowse
e73bb7f1e2 In getclnthandle(), if the address is found in the cache we need
to strdup() the address string before returning it via *targaddr
because the caller will free the string.

Change the comment at the top of getclnthandle() to clarify that
the caller is responsible for freeing *targaddr.

Noticed by:	sobomax
2001-08-02 21:31:21 +00:00
Dima Dorfman
d81b7e782a mdoc(7) police: remove hard sentence breaks. 2001-08-01 16:07:50 +00:00
Sheldon Hearn
86f478757a MFS: in HISTORY section, fix release number of first appearance 2001-08-01 12:15:21 +00:00
Sheldon Hearn
b47d4cf924 Fix broken Fn calls; Fn doesn't take a manual page section as an
argument.

Terminate the last sentence with a period.
2001-08-01 12:04:32 +00:00
Mark Peek
545d32087b Only pull in the MD files if they exist. This allows for progressive
implementation and compilation when bringing up a new architecture.
2001-07-31 16:34:52 +00:00
Brian Somers
74bd6d9d66 Mention the sa_handler and sa_sigaction #defines in the synopsis.
Mark sa_sigaction consistently.

MFC after: 1 week
2001-07-31 09:33:08 +00:00
Jeroen Ruigrok van der Werven
6a0fc191fb FreeBSD now also defines EIDRM and uses it.
Inspired by PR:		22470
Which was submitted by:	Bjorn Tornqvist <bjorn@west.se>
MFC after:	1 week
2001-07-30 19:30:26 +00:00
Jeroen Ruigrok van der Werven
2341e86854 Remove bogus BUGS section.
FreeBSD _does_ define ENOMSG as per SVID when IPC_NOWAIT is set.

PR:		22470
Submitted by:	Bjorn Tornqvist <bjorn@west.se>
MFC after:	1 week
2001-07-30 19:25:16 +00:00
Thomas Moestl
d35bce02ee Correct the old length argument passed to sysctlbyname to be a pointer
to a size_t (not to an int).

MFC after:	2 days
2001-07-29 22:01:55 +00:00
Sheldon Hearn
549c291915 Avoid any chance of being misunderstood as having libelled developers
or developers' vendors without compromising the importance of warning
against bad practice.

Reported by:	mjacob
MFC after:	1 week
2001-07-29 15:08:14 +00:00
Dima Dorfman
c569c0b5d2 Don't xref mt(1) just because it mentions ioctl.
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2001-07-29 09:17:54 +00:00
Dima Dorfman
f4c69d4b4d Don't capitalize variable names. 2001-07-29 09:17:16 +00:00
Dima Dorfman
43b8c5db92 ioctl(2) can return EFAULT from copyin.
PR:		29285
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2001-07-29 09:16:07 +00:00
Mike Heffner
75dc5f1a82 Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible
with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with
errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc'
patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to
maintain backwards compatibility.

Reviewed by:	sheldonh, assar
Obtained from:	NetBSD/OpenBSD
2001-07-29 00:52:37 +00:00
Chris Costello
3fb49e7db7 Add cross-references for the new kldsym(2) man page. 2001-07-27 03:03:36 +00:00
Chris Costello
bd2e4334e1 Add a new kldsym(2) man page. 2001-07-27 02:56:16 +00:00
Sheldon Hearn
745b20f712 The previous delta duplicated a significant amount of information
already found in the sigaction(2) manual.

As discussed with the committer of that delta, cross-reference the list
in sigaction(2) instead of duplicating the list of functions that are
safe for use within signal handlers.
2001-07-24 11:37:33 +00:00
Kris Kennaway
6979f76ff6 Sync to OpenBSD (update comment and minor style change).
Obtained from:	OpenBSD
MFC after:	1 week
2001-07-24 11:34:22 +00:00
Kris Kennaway
af13ede905 Sync to OpenBSD:
Clarify that if strlcat() does not find a NUL within siz byte it
will not NUL terminate either.

Document boundary condition when size < strlen(dst).

"of", not "on" (from Henric Jungheim)

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 11:32:29 +00:00
Sheldon Hearn
b2b50712a6 The delta introduced in the previous revision and attributed to the
OpenBSD project had grammar problems and made no attempt to motivate
the practice of saving errno.  Replace it with something better.
2001-07-24 11:15:13 +00:00
Sheldon Hearn
1d8ffb440b Finish the sweep of changes that fix doubled 'the'. 2001-07-24 08:30:55 +00:00
Kris Kennaway
fd9139a04e Add the list of signal-handler safe functions here too, so people can
find it more easily

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 08:26:37 +00:00
Kris Kennaway
057136d2c5 Add a few more functions which are safe to call from signal handlers,
and give a bit of advice.

Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 08:24:50 +00:00
Yaroslav Tykhiy
4bc14ac2f8 Unify SEE ALSO sections of the kld*.2 and mod*.2 manpages.
Previously, some useful xrefs were missing.
Now each of the pages refers to all remaining section 2 pages,
to the kld(4) page, and to a related utility's (section 8) page.
2001-07-24 07:59:54 +00:00
Mike Pritchard
b21b2f313e Fix some man page xrefs.
PR:		docs/26065
MFC after:	1 week
2001-07-22 11:51:11 +00:00
Jonathan Lemon
e725a1299a Document EVFILT_TIMER.
MFC after: 1 week
2001-07-19 18:35:19 +00:00
Dima Dorfman
df523897ea Don't claim that strncpy() is the same as strcpy().
PR:		29002
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-07-19 11:26:52 +00:00
Ruslan Ermilov
97e1bac189 mdoc(7) police: fix markup. 2001-07-18 15:55:34 +00:00
Ruslan Ermilov
e3745c75e6 mdoc(7) police: Add strncpy() to the NAME section. 2001-07-16 12:47:34 +00:00
Kris Kennaway
54b8fe08cf Remove unnecessary #include <stdlib.h>
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:48:28 +00:00
Kris Kennaway
5e2aa25bcf Oops, commit the version which actually works
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 04:04:22 +00:00
Kris Kennaway
bcef131fb8 Avoid a compile-time format string warning
Obtained from:	NetBSD
MFC After:	1 week
2001-07-16 03:55:47 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ian Dowse
52353da871 Fix a memory leak in __rpcb_findaddr(), avoid compiler warnings.
Submitted by:	Martin Blapp <mb@imp.ch>
2001-07-14 18:18:23 +00:00
Dima Dorfman
427fc5ed6f Recognize the %s format.
Submitted by:	Thomas Zenker <thz@lennartz-electronic.de> and
		    Maxim Konovalov <maxim@macomnet.ru>, respectively
Reviewed by:	-audit
2001-07-13 13:59:24 +00:00
Ruslan Ermilov
eb89426722 mdoc(7) police: removed punctuation after the last SEE ALSO xref. 2001-07-10 18:00:19 +00:00
David E. O'Brien
c34d5912ba style nits 2001-07-10 17:48:07 +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
Anton Berezin
b5b2871f9d Document more resolver(3) routines: dn_skip() from resolv.h, and
ns_get16(), ns_get32(), ns_put16(), and ns_put32() from arpa/nameser.h.

Markup by:	ru
OK'ed by:	markm
2001-07-09 20:46:00 +00:00
Ruslan Ermilov
e25e8ab41c mdoc(7) police: eliminate -ww warnings. 2001-07-09 15:54:36 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Mike Heffner
0bada8603d Attempt to use the environment variable TMPDIR for the temporary
directory, defaulting to /tmp.

PR:		bin/16924
Reviewed by:	dd
MFC after:	2 weeks
2001-07-07 04:08:32 +00:00
Ruslan Ermilov
5521ff5a4d mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
Yaroslav Tykhiy
be5eadbc1b Use the .Rv macro to describe the return value.
Suggested by:	ru
MFC after:	5 days
2001-07-04 13:07:38 +00:00
Ruslan Ermilov
f1db1f07ba mdoc(7) police: added missing newline after .Dv macro call,
removed hard sentence breaks.
2001-07-04 12:39:22 +00:00
Ruslan Ermilov
9d87be43f8 mdoc(7) police: use .Rv -std. 2001-07-04 12:32:43 +00:00
Ruslan Ermilov
62205fee40 mdoc(7) police: mark NULL with .Dv. 2001-07-04 12:04:25 +00:00
Ruslan Ermilov
4988599f44 mdoc(7) police: fixed/simplified formatting. 2001-07-04 11:59:14 +00:00
Ruslan Ermilov
b23e7b410b mdoc(7) police: sort xrefs. 2001-07-04 11:02:10 +00:00
Ruslan Ermilov
c155ff5cdd mdoc(7) police: print some example text with literal font. 2001-07-04 10:59:30 +00:00
Ruslan Ermilov
f80eb0cb14 mdoc(7) police: fixed bugs in rev. 1.19, split section headers names. 2001-07-04 10:53:15 +00:00
Ruslan Ermilov
3d1455a39d mdoc(7) police: compact VFCF_ list. 2001-07-04 10:42:03 +00:00
Dima Dorfman
368c2034f0 Describe the condition when EACCES is returned more explicitly.
Submitted by:	bde
2001-07-04 06:29:36 +00:00
Dima Dorfman
f9eeb822d0 mdoc(7) police: fix spacing issue
Submitted by:	ru
2001-07-03 21:16:34 +00:00
Yaroslav Tykhiy
e2a7d2044a First, fix a leftover of the cut'n'paste from the kld* pages:
change the name of the page (.Nm) from "kldstat" to "modstat".
Second, don't claim that modstat(2) always returns 0. Actually,
it behaves as most syscalls do - returns 0 on success, or -1
on failure.

MFC after:	5 days
2001-07-03 14:56:08 +00:00
Dima Dorfman
9e12bdbd79 EACCES may be returned if write permission was denied as well.
PR:		28553
Submitted by:	Ronald F. Guilmette <rfg@monkeys.com>
2001-07-02 22:53:40 +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
0e35d76ec4 event.h -> sys/event.h
Submitted by:	David Hill <david@phobia.ms>
2001-06-27 19:55:57 +00:00
Chris Costello
2f05bd957f Remove an extra word "fo" in the sentence "there is no process whose
process ID equals fo pid".

PR:		28436
Submitted by:	Gregory Bond <gnb@itga.com.au>
2001-06-27 04:21:28 +00:00
Andrey A. Chernov
d118fd8a39 Return "" if reallocf() fails 2001-06-25 20:56:59 +00:00
Andrey A. Chernov
ecffe71379 Describe success return value 2001-06-25 20:50:06 +00:00
Andrey A. Chernov
4e86aa7f9d Add transition period hack allowing old locale names return proper codeset too 2001-06-25 09:03:10 +00:00
Dima Dorfman
2b47b55f69 Add RETURN VALUES and ERRORS sections. 2001-06-25 01:25:01 +00:00
Dima Dorfman
53950232dd Minor cleanup: sort includes, fix name. 2001-06-25 01:21:13 +00:00
Dima Dorfman
ce1e308f7a Add a link to extattr.2 (from extattr_get_file.2). The other names
are too specific and too long, and extattr.2 makes a nice point of
reference for "extattr-related syscalls".
2001-06-24 23:58:27 +00:00
Dima Dorfman
444a2d61e8 Add a manual page for extattr_string_to_namespace and
extattr_namespace_to_string.

Reviewed by:	rwatson
2001-06-24 23:54:46 +00:00
Dima Dorfman
44fe68c421 mdoc(7) police: the BUGS section should go after HISTORY and AUTHORS. 2001-06-24 20:58:20 +00:00
Dima Dorfman
17011fc056 The fact that phk wrote this is not a bug! 2001-06-24 20:56:39 +00:00
Dima Dorfman
acaa9950a4 Reword a sentence to make it proper English. 2001-06-24 18:11:42 +00:00
Dima Dorfman
a910f192bb Remove duplicate words. 2001-06-24 01:34:38 +00:00
Ian Dowse
32de72d27f Add a new clnt_control() request `CLSET_CONNECT' that controls
whether or not connect(2) is used for UDP client sockets. The default
is not to connect(), so existing clients will see no change in
behaviour.

The use of connect(2) for UDP clients has a number of advantages:
only replies from the intended address are received, and ICMP errors
pertaining to the connection are reported back to the application.
2001-06-23 19:43:21 +00:00
Ruslan Ermilov
10ae6ece36 Document "normalizing" behavior of mktime(3).
PR:		bin/28313
Reviewed by:	bde, wollman
MFC after:	1 week
2001-06-23 08:57:40 +00:00
Jonathan Lemon
4dd2af159e Bring in fix from rev 1.32 that got lost during the conversion to kqueue.
This prevents an indefinte timeout in case the kevent call is interrupted
for some reason.

PR: 26665
MFC in: 2 weeks
2001-06-23 06:54:28 +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
Assar Westerlund
1866adc54f (cantwrite): do not allocate memory for a NULL string
PR:		misc/26044

MFC after:	1 week

Submitted by:	bde
2001-06-18 04:44:23 +00:00
Assar Westerlund
a52532c91a revert freeing of memory that gets allocated when str == NULL
(this will be fixed in a better way)

PR:		misc/26044
2001-06-18 04:40:52 +00:00
Mike Heffner
224e22e6c6 Fix typo: clnt_destroy() only takes one arg.
MFC after:	2 weeks
2001-06-18 00:45:31 +00:00
Assar Westerlund
207d92d043 free memory that gets allocated by vfprintf when str == NULL
PR:		misc/26044

MFC after:	1 week
2001-06-16 05:37:57 +00:00
Jens Schweikhardt
32b21f091e Add description for the 'll' modifier for long long. In essence a copy
from the 'l' description with s/long/long long/g.

PR:		27017
Submitted by:	Guy Harris <guy@alum.mit.edu>
MFC after:	2 weeks
2001-06-13 19:05:12 +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
Jonathan Lemon
add0681213 Fix small bogon.
Submitted by: Anton Berezin <tobez@tobez.org>
2001-06-11 18:15:31 +00:00
Andrey A. Chernov
75d03a7f04 Handle "ASCII" and "US-ASCII" aliases 2001-06-10 23:22:31 +00:00
Hajimu UMEMOTO
ce6282db3b Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers.  Need careful configuration
when enable it. (default config is not affected).
See manpage for details.

XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.

Obtained from:	KAME/NetBSD
2001-06-10 20:25:24 +00:00
Maxim Sobolev
000d56193c Fix cross-references:
xntpd.8 --> ntpd.8
acl_delete_perms.3 --> acl_delete_perm.3
getname.2 --> getsockname.2

MFC after:	1 week
2001-06-10 12:06:54 +00:00
Dima Dorfman
4088069c3a Xref dladdr(3).
Requested by:	-hackers
2001-06-08 22:50:33 +00:00
Maxim Sobolev
8657581bfd Correct cross-reference:
portmap.8 --> rpcbind.8

Submitted by:	.Xr testing script
2001-06-07 16:59:19 +00:00
Ruslan Ermilov
7125977be7 s/format/byte order/ (for clarity). 2001-06-07 15:15:38 +00:00
Dima Dorfman
a7d81577d6 urandom(4) -> random(4) in comments.
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Reviewed by:	md5(1)
Approved by:	markm
2001-06-07 02:32:18 +00:00
Dima Dorfman
df49b8e2ab urandom(4) -> random(4)
PR:		27858
Submitted by:	Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
Approved by:	markm
2001-06-07 02:31:03 +00:00
Warner Losh
656f411d33 Back out my changes describing how snprintf nul terminates. It
was from the iso standard.  Keep the sentence that says it is always
NUL terminated to make sure that people understand that.

Requested by: bde
2001-06-05 23:39:45 +00:00
Garrett Wollman
80d444c883 Don't mung the user's tm_sec field if we don't need to. (Belt-and-suspenders
version.)

PR:		bin/27630
Submitted by:	Arthur David Olson <ado@nci.nih.gov>
Obtained from:	Timezone mailing-list <tz@elsie.nci.nih.gov>
MFC after:	1 month
2001-06-05 20:13:28 +00:00
Warner Losh
7528c356f5 I neglected to notice that the change text had already been added in a
different place. Back out what I added since the other text is better.

Noticed by: nectar
2001-06-05 16:43:51 +00:00
Maxim Sobolev
76c6864951 Fix cross-references:
ipnat.8 --> ipnat.1
  environ.5 --> environ.7
  isssetugid.2 --> issetugid.2

MFC after:	1 week
2001-06-05 12:23:22 +00:00
Warner Losh
485839b9ee Document what happens when the real id is changed.
I may have obtained this from NetBSD, but I don't recall.  I do know that
I checked FreeBSD's implementation to make sure that it matched what I wrote.
2001-06-05 04:35:42 +00:00
Warner Losh
890d5b436d Minor improvements:
o Explain snprintf's return value better.
o Document snprintf, et al, were defined in C-99
o Warn against %n.
2001-06-05 04:22:30 +00:00
Daniel Eischen
fcd70a7565 Properly initialize a temporary FILE that is allocated off the stack.
The change to reuse _up from FILE (to allow FILE to grow without changing
size) overlooked FILE being allocated off the stack.

Approved by:	sobomax
2001-06-04 12:36:07 +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
Ian Dowse
a8634a0009 Copy the sockaddr from the netbuf data area, not from the netbuf
data pointer. This bug has been here since the ti-rpc import; it
apparently broke the clnt_control CLGET_SVC_ADDR options.

PR:		misc/27813
Submitted by:	Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2001-06-01 15:20:45 +00:00
Ruslan Ermilov
0b381bf1fd Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
Gregory Neil Shapiro
1259dd85eb Correct the documentation for snprintf() and vsprintf() which actually
return the number of characters that would have been in the new string.

Obtained from:	OpenBSD
MFC after:	3 days
2001-05-30 23:47:14 +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
David E. O'Brien
5864b79cd2 Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.
Do the same for the non-wcs*/wmem* files while I'm here.
2001-05-24 08:47:42 +00:00
Matthew Dillon
ac8f990bde This patch implements O_DIRECT about 80% of the way. It takes a patchset
Tor created a while ago, removes the raw I/O piece (that has cache coherency
problems), and adds a buffer cache / VM freeing piece.

Essentially this patch causes O_DIRECT I/O to not be left in the cache, but
does not prevent it from going through the cache, hence the 80%.  For
the last 20% we need a method by which the I/O can be issued directly to
buffer supplied by the user process and bypass the buffer cache entirely,
but still maintain cache coherency.

I also have the code working under -stable but the changes made to sys/file.h
may not be MFCable, so an MFC is not on the table yet.

Submitted by:	tegge, dillon
2001-05-24 07:22:27 +00:00
Jim Pirzyk
d825ca42c9 Changed the clnt_perror string in yp_all because it was saying the
error came from yp_next

PR:	bin/13254
Submitted by:	Jim Pirzyk
Reviewed by:	jkh
MFC after: 1 week
2001-05-23 15:37:10 +00:00
Ruslan Ermilov
6ad10804f7 Rename (after a repo-copy) some mount(8) programs:
mount_fdesc -> mount_fdescfs
mount_null -> mount_nullfs
mount_portal -> mount_portalfs
mount_umap -> mount_umapfs
mount_union -> mount_unionfs
2001-05-23 14:58:19 +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
Hajimu UMEMOTO
1022dd3dcc Correct error message of an example.
Obtained from:	KAME
2001-05-21 10:05:36 +00:00
Archie Cobbs
88c1867f5c Document ECONNREFUSED.
Submitted by:	Richard Hodges <rh@matriplex.com>
2001-05-20 00:12:06 +00:00
Ian Dowse
a9d09e93db The function clnt_dg_call(), which is used for UDP RPC calls, could
accidentally clobber the server address if a stray packet arrived
at the client port. This would result in any further retransmits
going to the wrong address.

For now, fix this by not saving the source address of the reply; this
matches the pre-tirpc behaviour.
2001-05-18 19:43:18 +00:00
Ruslan Ermilov
58ceb60878 Suppress compiler warning by adding a type cast. 2001-05-17 12:51:43 +00:00
Ruslan Ermilov
45993e3bd4 ... but we do provide .St -isoC-99, and it is not required to have the
history info as:

: .Sh STANDARDS   If the command, library function or file adheres to a
:                 specific implementation such as IEEE Std 1003.2
:                 (``POSIX.2'') or ANSI X3.159-1989 (``ANSI C'') this
:                 should be noted here.  If the command does not adhere
:                 to any standard, its history should be noted in the
:                 HISTORY section.
2001-05-17 08:22:43 +00:00
Ruslan Ermilov
9d3618b999 Unbreak world; _DIAGASSERT macro is not available in FreeBSD. 2001-05-16 14:34:47 +00:00
Ruslan Ermilov
9af42d27b1 mdoc(7) police: fix markup. 2001-05-16 09:50:12 +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
Takuya SHIOZAKI
01e281bd12 adapt to FreeBSD.
- enable locale-insensitive functions of wchar.h:
	wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c
        wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c
	wcsstr.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c
	XXX: wcswidth.c is not enabled yet.
- enable wmemchr(3) man page.
	XXX: FreeBSD lacks .St -isoC99 and .St -isoC-amd1.
2001-05-15 20:34:20 +00:00
Ruslan Ermilov
a289e937e3 mdoc(7) police: sort xrefs. 2001-05-15 15:57:05 +00:00
Ruslan Ermilov
ec7d12549c Add new, from scratch implementation of hsearch() et al that actually works.
Obtained from:	NetBSD
MFC after:	1 month
2001-05-15 07:08:20 +00:00
Takuya SHIOZAKI
9829d36a86 initial import of locale insensitive wcs* and wmem* functions.
Obtained from:	NetBSD and Citrus.
2001-05-15 06:01:19 +00:00
Ruslan Ermilov
86315d60a0 mdoc(7) police: add RETURN VALUES section.
PR:		docs/27161
Submitted by:	Kazuhiro KONDOU <k-fuji@za2.so-net.ne.jp>
2001-05-14 18:38:05 +00:00
Ian Dowse
1a154a146c Extract the path from an AF_LOCAL sockaddr_un in a way that correctly
terminates the string in all cases, based on code from netstat(1).
The path in a sockaddr_un is terminated either by a '\0', or by
the end of the sockaddr as defined by sun_len.

Previously, the code could write the "safety" '\0' beyond the end
of the sockaddr (sockaddr_un's need only be large enough to store
sun_len bytes), and writing into the the supplied sockaddr is bad
anyway.
2001-05-12 20:05:26 +00:00
Alexander Langer
bda3261e9b gethostbyname2() can't do AF_INET6 lookups over NIS.
getaddrinfo(3) must be used.

Submitted by:	ume
2001-05-08 11:21:15 +00:00
Chris D. Faulhaber
fda2d391d6 Correct prototype (entry_p -> *entry_p)
Submitted by:	Alex Zepeda <jazepeda@pacbell.net>
2001-05-07 23:16:25 +00:00
Alexey Zelkin
1d7f7b7a7a add nl_langinfo(3) 2001-05-03 15:12:52 +00:00
Alexey Zelkin
b3d588380e Eliminate BUGS section. No one of listed bugs is applicable to FreeBSD-current
anymore.
2001-05-03 15:05:16 +00:00
Alexey Zelkin
1496a706b9 add manpage for nl_langinfo(3)
Reviewed by:	ru
2001-05-03 15:02:50 +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
Archie Cobbs
1fed00197f Add getaddrinfo(3) to the "SEE ALSO" list. 2001-04-27 18:18:12 +00:00
Ruslan Ermilov
7ab50d97ea Grammar nit. 2001-04-27 08:16:57 +00:00
Chris D. Faulhaber
21aaa49c89 Document acl_get_entry(3)
Obtained from:	TrustedBSD Project
2001-04-26 22:28:14 +00:00
Ian Dowse
f2b95b20dc The function __rpc_uaddr2taddr_af() converts an RPC "universal
address" string to a netbuf/sockaddr "transport address". In the
case of an AF_LOCAL address, it was missing the code to actually
point the netbuf at the newly allocated sockaddr_un, so the caller
ended up with a netbuf containing junk.

Submitted by:	 Martin Blapp <mb@imp.ch>
2001-04-26 17:24:05 +00:00
Chris D. Faulhaber
0f6263079e o Separate acl_t into internal and external representations as
required by POSIX.1e.  This maintains the current 'struct acl'
  in the kernel while providing the generic external acl_t
  interface required to complete the ACL editing library.
o Add the acl_get_entry() function.
o Convert the existing ACL utilities, getfacl and setfacl, to
  fully make use of the ACL editing library.

Obtained from:	TrustedBSD Project
2001-04-24 22:45:41 +00:00
Thomas Moestl
a483f58aea Remove bogus assignments of libc syscall stub return values to errno;
the stubs do errno assignments and return -1 in this case, so that errno
would end up with this value.

Approved by:	rwatson
2001-04-24 20:50:42 +00:00
Andrey A. Chernov
74825256ef Add sranddev.3 to MLINKS 2001-04-23 11:11:00 +00:00
Andrey A. Chernov
4890ae810e Add #include "un-namespace.h" 2001-04-23 10:38:26 +00:00
Andrey A. Chernov
848422bb7d srand*dev() fallback code: change ^getpid() to ^(getpid() << 16) to allow
change of high word part too to produce more interesting seed distribution.
2001-04-23 10:14:28 +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
Andrey A. Chernov
7708205cb7 Add sranddev() since srand() is not vary much with seed, typical time 2001-04-23 02:29:10 +00:00
Ruslan Ermilov
33dfeb89df mdoc(7) police: update referenced standard name. 2001-04-18 16:01:43 +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
Ruslan Ermilov
2d105f1659 mdoc(7) police: fix markup. 2001-04-18 13:16:47 +00:00
Ruslan Ermilov
79d4920b1d mdoc(7) police: use .Fx where appropriate. 2001-04-18 13:14:47 +00:00
Kris Kennaway
4b7369ea64 Correct a typo; prefered -> preferred. 2001-04-17 08:01:54 +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
Ruslan Ermilov
50597ec66b mdoc(7) police: add missing .El call. 2001-04-16 15:06:57 +00:00
Ruslan Ermilov
6061acb30c mdoc(7) police: fix markup. 2001-04-16 15:06:19 +00:00
Dima Dorfman
5e75e35cca Grammar police: "its", not "it's", is the possessive form of "it". 2001-04-15 19:53:47 +00:00
Dima Dorfman
143b77576c Make links from setresuid.2 to getresgid.2 and getresuid.2. 2001-04-15 19:41:44 +00:00
Dima Dorfman
8a13bcbece Document getresgid and getresuid calls.
Reviewed by:	ru
2001-04-15 19:40:22 +00:00
Chris D. Faulhaber
d5675fffd1 Correct a bogus cast in acl_get_qualifier() causing invalid
ID's to be stored in the ACL.

Obtained from:	TrustedBSD Project
2001-04-15 15:21:15 +00:00
Dima Dorfman
161897cfcb Add `RETURN VALUES'' and `ERRORS'' sections since getpgid(2) can
fail.  Also fix a minor grammar nit (it's -> its).

PR:		26520
2001-04-14 02:34:59 +00:00
Chris D. Faulhaber
9a227c5754 Add acl_get_perm_np(3), a non-portable function to check if a
permission is in a permission set, required for third-party
applications such as Samba.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-13 19:37:04 +00:00
Chris D. Faulhaber
94ef417e4b Add the remaining POSIX.1e ACL definitions:
ACL_UNDEFINED_TAG, ACL_UNDEFINED_ID, ACL_FIRST_ENTRY, ACL_NEXT_ENTRY

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-13 19:14:38 +00:00
Chris D. Faulhaber
bbf2cf59fc Revamp acl_create_entry() so it actually works.
Obtained from:	TrustedBSD Project
2001-04-11 22:09:51 +00:00
Chris D. Faulhaber
fb1af1f2bf Correct the following defines to match the POSIX.1e spec:
ACL_PERM_EXEC  -> ACL_EXECUTE
  ACL_PERM_READ  -> ACL_READ
  ACL_PERM_WRITE -> ACL_WRITE

Obtained from:	TrustedBSD
2001-04-11 02:19:01 +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
Daniel Eischen
278d1a20e8 Include <unistd.h> so that read(2) and write(2) don't cause warnings. 2001-04-10 03:55:19 +00:00
Daniel Eischen
cb868ac594 Fix a comment within a comment warning due to a missing "*/". 2001-04-10 03:47:40 +00:00
Ian Dowse
e14f19f42a The maximum RPC message size was set at 8k for UDP. This is lower
than the default buffer size in the old RPC code (8800 bytes), and
it could not be overriden by the application. This caused problems
with CFS (/usr/port/security/cfs).

Change this default back to UDPMSGSIZE (8800 bytes), but more
importantly, allow applications to use larger message sizes for
all protocols if desired. Choose an arbitrary maximum message size
of 256k instead of using the default as the maximum (which is
silly).

Reported by:	ache
Reviewed by:	alfred, Martin Blapp <mb@imp.ch>
2001-04-08 19:21:50 +00:00
Dima Dorfman
92020f7a8c Mention that locks are inherited across an exec.
PR:		24802
Submitted by:	Kenneth Ingham <ingham@i-pi.com>
2001-04-08 19:11:25 +00:00
Dima Dorfman
779b2ff010 Install links to extattr_(get|set|delete)_fd.2 (from extattr_get_file.2). 2001-04-08 06:58:48 +00:00
Ruslan Ermilov
1a4fc0bfba mdoc(7) police: add missing LIBRARY section. 2001-04-05 07:51:48 +00:00
Ruslan Ermilov
8eb5b197f1 Unbreak world.
Submitted by:	jhay
2001-04-05 07:47:06 +00:00
Ruslan Ermilov
31acc83627 Record -lposix1e merge with -lc. 2001-04-05 07:42:56 +00:00
Ruslan Ermilov
336ee39a26 mdoc(7) police rev 1.11: convert descriptions and cross-references
for the ACL editing library functions to the plain tagged list.
2001-04-05 07:35:59 +00:00
Chris D. Faulhaber
6822f9df3f - Add descriptions and cross-references for the ACL editing library
functions.
- Place the acl_dup() description in alphabetical order.
- Move the POSIX.1e descriptions under the ENVIRONMENT section to the
  STANDARDS section.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-05 01:48:07 +00:00
Chris D. Faulhaber
4aa97316b4 Install the acl_create_entry.3 man page 2001-04-05 01:36:54 +00:00
Dima Dorfman
e078cd7418 Document the extattr_(get|set|delete)_fd calls, and add a note warning
people that these calls are likely to change in the future.

Reviewed by:	rwatson
2001-04-05 01:24:05 +00:00
Thomas Moestl
8b28ef9528 Activate build of posix1e extensions in libc and libc_r that have been
moved in from libposix1e, and deactivate build of the soon-to-be-removed
libposix1e.

Approved by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-04 18:17:28 +00:00
Thomas Moestl
37bc56f85b Add entries for the posix1e functions that will be overridden in libc_r.
Approved by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-04 18:04:10 +00:00
Thomas Moestl
7bd44e9223 Prepare for the inclusion of libposix1e into libc: retire the old
Makefile, add Makefile.inc needed for libc build; add
#include "namespace.h"/#include "un-namespace.h" pairs around the
includes of sys/acl.h and sys/capability.h, and an additional underscore
in front of the functions that will be overridden in libc_r.

Approved by:	rwatson
Obtained from:	TrustedBSD Project
2001-04-04 18:00:52 +00:00
Ruslan Ermilov
6a5e9ec940 mdoc(7) police: add missing .Pa call. 2001-04-04 09:52:28 +00:00
Ian Dowse
b3a38fe35a Fix some very broken code in __nc_error() that implements per-thread
`nc_error' variables. Move the nc_lock mutex from mt_misc.c to a
static variable within this function, since it is only used here.

Add a new getnetconfigent() error code `NC_NOTFOUND' to report the
case where the specified netid was not found. Set nc_error in all
error cases in getnetconfigent() so that the error messages returned
by nc_(s)perror are always meaningful.

Add a terminating \n to the output of nc_perror() to match both
our manpage and other implementations of this function.

Reviewed by:	deischen, alfred, Martin Blapp <mb@imp.ch>
2001-04-03 23:48:28 +00:00
Ian Dowse
c622922310 Remove some hacks that were apparently added to avoid problems with
RPC clients hanging. The real problem turned out to be missing
cleanup code; this was fixed in clnt_vc.c r1.5 and clnt_dg.c r1.4.

Submitted by:	Martin Blapp <mb@imp.ch>
2001-04-03 22:07:19 +00:00
Ian Dowse
cd51746902 There were a few error cases where the RPC code would return with
all signals masked (whoops). Add the missing cleanup code.

Reviewed by:	Martin Blapp <mb@imp.ch>, alfred
2001-04-02 22:14:13 +00:00
Ian Dowse
9f5afc134f Move the #includes of reentrant.h to after the `#include "namespace.h"',
so that the underscored versions of the pthread functions get
declared.  This removes around 300 lines of 'implicit declaration
of XXX' warnings from the output of a libc build with -Wall.

Reviewed by:	Martin Blapp <mb@imp.ch>, alfred
2001-04-02 21:41:44 +00:00
Dima Dorfman
4811703143 Hook the extattr_get_file.2 manual page into the build. Add MLINKS
for extattr_set_file.2 and extattr_delete_file.2.
2001-04-01 23:46:56 +00:00
Dima Dorfman
7a6b7e421d A manual page for the extattr_get_file, extattr_set_file, and
extattr_delete_file system calls.

Reviewed by:	rwatson, ru
Approved by:	nik
2001-04-01 23:45:11 +00:00
Ruslan Ermilov
50c9722d3b mdoc(7) police: LIBRARY should be before SYNOPSIS. 2001-03-29 13:03:23 +00:00
Chris D. Faulhaber
5a696f5d02 Correct function name: acl_clear_perm -> acl_clear_perms 2001-03-29 00:48:54 +00:00
Ben Smithurst
fa6b8c1f53 Catch up with a comment that changed in rev1.73 of mount.h
PR:		25836
Submitted by:	Tony Finch <dot@dotat.at>
2001-03-29 00:29:00 +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
Poul-Henning Kamp
392550af02 The f_syncreads and f_asyncreads entries are missing from the man page.
This also tidies up the formatting a bit and omits all the padding
entries.

PR:		25834
Submitted by:	Tony Finch <dot@dotat.at>
2001-03-28 18:21:54 +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
Robert Watson
3cd4410688 o De-uglify IMPLEMENTATION NOTES section by removing unnecessary use of
.Fx
2001-03-28 01:03:33 +00:00
Bill Paul
65d3c627a5 Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transport
to make asynchronous RPCs. This is needed to help fix ypbind, which can no
longer override the clnt_dg_call() method (formerly the clntudp_call()
method) due to all the internal descriptor locking code in TI-RPC. Turning
on this flag allows us to send an RPC request, then return immediately,
and handle a reply later, rather than being forced to do the request
and reply in a single function call.

Also fix a byte ordering bug: when clnt_dg_call() increments the XID
prior to transmitting a request, it uses the raw value, which is wrong.
The XID is stored in network byte order, i.e. big-endian. The CLSET_XID
and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get
the byte ordering right, but because clnt_dg_call() does not do this,
using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a
big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap
properly when doing the increment.
2001-03-27 21:27:33 +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
Alfred Perlstein
40c10ffdbd const'ify 2001-03-27 09:43:09 +00:00
Robert Watson
a21c3aa0e9 o Update copyright date
o Revise description in light of commits over last month including:
  - ACL editing library is now implemented
  - ACLs are now implemented

Obtained from:	TrustedBSD Project
2001-03-26 19:55:35 +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
David E. O'Brien
06fa7267ef Fix rcsid/$FreeBSD$.
Reduce diff from what I think is the original sources.
2001-03-24 00:22:13 +00:00
Alfred Perlstein
5309da9716 fix Alpha support 2001-03-24 00:07:06 +00:00
Hajimu UMEMOTO
2da24fa6e9 IPv4 address is not unsigned int. This change introduces in_addr_t.
PR:		9982
Adviced by:	des
Reviewed by:	-alpha and -net (no objection)
Obtained from:	OpenBSD
2001-03-23 18:59:31 +00:00
Alfred Perlstein
cc74aaddad change callrpc() from taking "char *" args, I'm quite sure they really meant
to use "void *".

remove a duplicate prototype for callrpc() from libexec/ypxfr/ypxfr_extern.h
2001-03-23 16:14:49 +00:00
Ruslan Ermilov
01f491fa8e mdoc(7) police: fix markup. 2001-03-23 14:01:28 +00:00
Chris D. Faulhaber
3dfe3292f1 Correct the acl_set_permset and acl_set_tag_type man pages
which somehow got mixed up with the acl_get_* man pages.

Submitted by:	ru
2001-03-23 11:30:31 +00:00
Ruslan Ermilov
8480a1eb14 mdoc(7) police: fix markup. 2001-03-23 09:39:35 +00:00
Ruslan Ermilov
f8376ccd46 mdoc(7) police: fix markup, function prototype, and RETURN VALUES text. 2001-03-23 09:38:43 +00:00
Chris D. Faulhaber
4bf60dfaf8 Add the following ACL editing functions:
acl_add_perm, acl_clear_perms, acl_copy_entry, acl_create_entry,
  acl_delete_perm, acl_get_permset, acl_get_qualifier, acl_get_tag_type,
  acl_set_permset, acl_set_qualifier, acl_set_tag_type

This brings us within 4 functions of a full ACL editing library.

Reviewed by:	rwatson
2001-03-22 22:31:01 +00:00
Alfred Perlstein
392df6bce7 Remove struct cmessage from sys/socket.h and reintroduce the private
definitions.

Requested by: wollman
2001-03-22 20:43:13 +00:00
Alfred Perlstein
4ed6d63483 Hopefully fix some of the bugs in passing credentials over UNIX domain sockets.
Make struct cmessage visible from socket.h (about 4 places were
defining it for themselves which wasn't good)

Make __rpc_get_local_uid() useable and give it prototype that's
visible.

Fix some issues with printing out usernames from rpcbind and keyserv.
2001-03-22 04:31:30 +00:00
Andrey A. Chernov
58dae109b5 Get rid of non-standard %E[Ff] formats, userland apps already fixed 2001-03-21 14:52:12 +00:00
Andrey A. Chernov
50b4c62c47 Oops, back out prev. change - POSIX require %y in d_fmt
Cosmetique - use exact POSIX string for %c
2001-03-21 14:12:37 +00:00
Andrey A. Chernov
e81765cbbc Replace %y with %Y 2001-03-21 13:55:09 +00:00
Alfred Perlstein
fa87b7ea70 whitespace cleanup 2001-03-20 20:28:09 +00:00
Ruslan Ermilov
11d84435fb Fixed some typos. 2001-03-20 10:47:21 +00:00
Ruslan Ermilov
23601548ef This manpage is heavily based on the old rpc.3 manpage, and
should have been repo-copied from it in the first place.

Apply all of our fixes up to and including revision 1.14 to
the original rpc.3 manpage, including conversion to mdoc(7).
2001-03-20 10:46:22 +00:00
Ruslan Ermilov
711abb6d69 Removed the second copy of the manual page! 2001-03-20 09:02:32 +00:00
Ruslan Ermilov
6ebf123741 Removed duplicate $FreeBSD$. 2001-03-20 08:51:20 +00:00
Dima Dorfman
895e96279a Make it clear who can and can't set the UF_NODUMP, UF_OPAQUE, and
SF_ARCHIVED file flags.

PR:		25227
Approved by:	nik
2001-03-19 23:51:09 +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
Andrey A. Chernov
71a71d575f Implement D_MD_ORDER (local extension) to get month/day order from locale 2001-03-19 11:55:12 +00:00
Ruslan Ermilov
bc057d3dff mdoc(7) police:
- lowercase Nd argument
- mark function arguments with Fa
- mark defined values with Dv
- simply copying POSIX text for RETURN VALUES and ERRORS sections is not
  always a good idea.  POSIX uses the word "shall" indicating the behavior
  the correct implementation should follow.
2001-03-19 08:08:22 +00:00
Robert Watson
d51048c93b o Rename "namespace" argument to "attrnamespace" as namespace is a C++
reserved word.

Submitted by:	jkh
Obtained from:	TrustedBSD Project
2001-03-19 05:05:41 +00:00
Chris D. Faulhaber
14721edabe Add the following POSIX 1003.1e functions and man pages:
o acl_calc_mask(): calculates the ACL mask entry associated with
    the given ACL.
  o acl_delete_entry(): remove a specified ACL entry from the given
    ACL.

Approved by:	rwatson
2001-03-19 03:19:51 +00:00
Andrey A. Chernov
16a7ebb62d Fix typo in the comment 2001-03-18 12:20:38 +00:00
Andrey A. Chernov
faeb1b822a Relax local FreeBSD restrictions on 3 chars abbrev. name length and %c format
since they not allows POSIXly legal locale data. Currently, if relaxed form
POSIXly legal locale data will be used right now, some programs will be broken,
but it means that either locale data or programs must be fixed, not the library.

Introduce non-standard md_order (month/day order) locale field to be used later
via nl_langinfo(). Currently %EF and %Ef emulated using this field, but they
planned for remove in future in favour of nl_langinfo() test field.

Implement %F per POSIX
2001-03-18 11:58:15 +00:00
Andrey A. Chernov
f7c5bca2ef Make 'A' and 'a', 'B' and 'b' the same, per POSIX 2001-03-18 08:41:06 +00:00
Hajimu UMEMOTO
69b58b037c Nuke non-standard EAI_RESNULL. 2001-03-17 14:25:23 +00:00
Matthew Dillon
66e845d8dc Fix type-o
Submitted by: okazaki
2001-03-16 22:18:26 +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
Dima Dorfman
69451beb84 Correct descriptions of SOCK_RDM and SOCK_SEQPACKET.
PR:		25797
Submitted by:	Yuko Sasaki <yuko@veltec.co.jp>
Approved by:	nik
2001-03-16 01:18:03 +00:00
David Malone
9b860e1c34 Correct spelling of MNT_ASYNC.
PR:		25835
Submitted by:	Tony Finch <dot@dotat.at>
2001-03-15 19:52:04 +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
Robert Watson
1bc2362e07 o To support new EA interface with explicit namespaces, introduce two
utility functions which convert between string namespace names and
  numeric constants used by the interface.  Right now, two namespaces
  are supported, EXTATTR_NAMESPACE_SYSTEM ("system") and
  EXTATTR_NAMESPACE_USER ("user").  These functions are used by
  various userland EA utilities, rather than hard coding the routines
  all over the place.

Obtained from:	TrustedBSD Project
2001-03-15 03:00:39 +00:00
Dima Dorfman
681b009b93 Make tdelete(3), tfind(3), and twalk(3) links to tsearch(3).
Approved by:	nik
2001-03-15 01:53:17 +00:00
Robert Watson
2de14c39b5 o Update copyright dates.
o Rename internal library functions so that they are prefixed with
  _posix1e or _POSIX1E, removing them from the application namespace (and
  potential conflict with other ACL functions elsewhere in the system).

Obtained from:	TrustedBSD Project
2001-03-13 02:31:32 +00:00
Dima Dorfman
438821dfc9 Document the rest of the possible return codes.
PR:		25188
Approved by:	nik
2001-03-13 01:08:36 +00:00
Ruslan Ermilov
95b2071c56 .St -p1003.1g -> .St -p1003.1g-2000. 2001-03-12 17:28:01 +00:00
Ruslan Ermilov
7f3a1ed2a7 This is the getsid() we are talking about, not setsid().
PR:		docs/25626
Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>
2001-03-09 11:16:09 +00:00
David E. Cross
57db636284 Submitted by: Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
Reviewed by:	David Cross <dec@freebsd.org>, jkh <jkh@freebsd.org>
Approved by:	jkh <jkh@freebsd.org>
Obtained from:	Ian Dowse <iedowse@maths.tcd.ie>, David Cross <dec@freebsd.org>
We have been running this patch on a production NIS server for 2.5 weeks now.
Normally we would have ypserv die at least once a week, and often many times
a day.

This patch treats and error from select as zeroing out the FD_SET to indicate
that no fds are ready for reading.  This is safe because the rpc code
always re-inits the FDSET before calling select.
2001-03-08 13:57:41 +00:00
Doug Rabson
ac9a4fc876 Use relative paths to find byte_swap_*.S to make it easier to use these
from libstand.
2001-03-06 16:08:19 +00:00
Doug Rabson
5e1202d5d3 Make this compile. Still need to write/borrow a working setjmp. 2001-03-06 16:07:41 +00:00
Doug Rabson
62b8ce411f Use ieee floats on ia64. 2001-03-06 16:06:38 +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
eed5465d4e Fix style nit. 2001-03-05 11:10:12 +00:00
David E. O'Brien
2c4b10dd85 Fix style breakage. 2001-03-05 11:06:18 +00:00
David E. O'Brien
ca740c1f47 Fix style that got corrupted. 2001-03-05 10:39:03 +00:00
David E. O'Brien
b373451cbe Fix FreeBSD id style breakage from rev 1.17 2001-03-05 10:30:12 +00:00
David E. O'Brien
1e58303f9f Use our standard .c rcsid format. 2001-03-05 10:21:05 +00:00
David E. O'Brien
e4efb830ff Fix copyright breakage in rev 1.2.
We *cannot* remove clause #4 from the Univ of California's license.
2001-03-05 10:18:15 +00:00
David E. O'Brien
de3ac4d068 Correct a comment. 2001-03-05 10:00:57 +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
Andrey A. Chernov
54e3bc256e Change mon_decimal_point from "." to "" (N/A>) as it is specified by POSIX for
POSIX locale.
2001-03-03 21:03:15 +00:00
Andrey A. Chernov
c0bbece16d Actually implement T_FMT_AMPM 2001-03-02 22:12:19 +00:00
Andrey A. Chernov
50bab1e6fb Implement ampm_fmt (%r) per POSIX 2001-03-02 22:10:04 +00:00
Ruslan Ermilov
efbe286b68 Removed duplicate $FreeBSD$. 2001-03-02 13:00:26 +00:00
Ruslan Ermilov
825d095dd3 Fix setlocale() to conform to the ISO C and POSIX standards.
The below text is quoted from the latest POSIX draft:

: The values of locale categories shall be determined by a precedence
: order; the first condition met below determines the value:
:
: 1. If the LC_ALL environment variable is defined and is not null,
:    the value of LC_ALL shall be used.
: 2. If the LC_* environment variable (LC_COLLATE, LC_CTYPE, LC_MESSAGES,
:    LC_MONETARY, LC_NUMERIC, LC_TIME) is defined and is not null, the
:    value of the environment variable shall be used to initialize the
:    category that corresponds to the environment variable.
: 3. If the LANG environment variable is defined and is not null, the
:    value of the LANG environment variable shall be used.
: 4. If the LANG environment variable is not set or is set to the empty
:    string, the implementation-defined default locale shall be used.

The conditions 1 and 2 were interchanged, i.e., LC_* were looked first,
then LC_ALL, then LANG (note that LC_ALL and LANG were essentially the
same, providing the default, with LC_ALL taking precedence over LANG).
Now, LC_ALL and LANG serve the different purposes.  LC_ALL overrides
any LC_*, and LANG provides the default fallback.

Testcase:

/usr/bin/env LC_ALL=C LC_TIME=de_DE.ISO_8859-1 /bin/date

Should return date in the "C" locale format.

Inspired by:	date(1) reference page in the Draft
2001-03-02 12:45:52 +00:00
Daniel Eischen
45d8008748 Hide the definition of struct __sFILEX and add the needed
lock definitions to it.  flockfile state is now allocated
along with the rest of FILE.  This eliminates the need for a
separate allocation of flockfile state as well as eliminating
the mutex/lock used to serialize its allocation.
2001-03-01 05:22:14 +00:00
Daniel Eischen
3b5b529f2e s/fstat/_fstat/
Approved by:	phantom
2001-03-01 04:59:01 +00:00
David E. O'Brien
083745b549 Merge in strtoul.3 rev 1.11 mdoc(7) police changes:
.Nd line broken in rev 1.10
	use .Bx for ``BSD''
2001-02-28 17:46:56 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Jonathan Lemon
079a79149a Use the new EV_SET macro to insure that all fields in struct kevent
are correctly initialized before use.  This should fix the problem
with DNS.

Pointy hat to:  me
2001-02-28 15:47:47 +00:00
Ruslan Ermilov
0b01af0991 mdoc(7) police: fix the .Nd line broken in previous revision.
Noticed by:	bde

Use .Bx for ``BSD''.
2001-02-28 12:54:16 +00:00
Andrey A. Chernov
cbcf73f998 Use formula with better random distribution for rand()
Even better formula from random() could not be intetgrated because rand_r()
supposed to store its state in the single variable (but table needed for
random() algorithm integration).
2001-02-27 14:42:19 +00:00
David E. O'Brien
3bdced7c3c I accidently deleted an include when I added the $FreeBSD$ so I could
check in my changes.
2001-02-27 14:30:42 +00:00
Ruslan Ermilov
8ac6dca795 In soshutdown(), use SHUT_{RD,WR,RDWR} instead of FREAD and FWRITE.
Also, return EINVAL if `how' is invalid, as required by POSIX spec.
2001-02-27 13:48:07 +00:00
David E. O'Brien
4c0440cb86 Impliment the ISO-C99 strto[u]ll()
and rewrite strto[u]q() in terms of it.
2001-02-27 13:33:07 +00:00
Ruslan Ermilov
fdc1fef594 Use ``.St -p1003.[12]''. 2001-02-26 16:12:39 +00:00
Ruslan Ermilov
2fba8dcd52 Use ``.St -p1003.1g''. 2001-02-26 16:08:15 +00:00
Ruslan Ermilov
096841eceb Use ``.St -p1003.1-96''. 2001-02-26 15:16:43 +00:00
Ruslan Ermilov
589a5e341f /^\.St/ s/-iso9945-1/-p1003.1-96/ 2001-02-26 14:48:38 +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
Jason Evans
789d148cca Document the EINTR error. 2001-02-26 09:38:01 +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
Jonathan Lemon
5d1c9c5606 Document various changes to kq:
- new EV_SET macro,
    - NOTE_LOWAT option for low water marks on read/write filters,
    - NOTE_REVOKE for filesystem unmounting (and revoke() calls)
    - improved API for EVFILT_AIO
2001-02-26 04:16:19 +00:00
Jimmy Olgeni
a68886ad51 Fix my ambiguous message about ECONNABORTED.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-02-25 23:56:41 +00:00
Jimmy Olgeni
ff08a1b858 Add ECONNABORTED to the ERRORS section. 2001-02-25 22:12:40 +00:00
Tor Egge
3275de7ca5 Update unused __dtoa prototypes to match reality. 2001-02-25 08:51:41 +00:00
Alexey Zelkin
41b55591ce Fix visibility of empty variable -- it should be static.
Submitted by:	bde and Hartmut Brandt <brandt@fokus.gmd.de> (via PR)
PR:		bin/25308
2001-02-24 13:13:48 +00:00
Brian Feldman
75d4fd11cb Correctly handle the race itself, too (don't leave it locked).
This is about to be replaced anyway by initialization explicitly
instead of lazily, and reducing the complexity of it.  As it is
now, this will work fine, however.
2001-02-23 17:55:01 +00:00
Brian Feldman
93f9377a7c Use the right names to call pthread_mutex_{,un}lock so that things
work in both the libc only and libc/libc_r case.
2001-02-23 06:26:22 +00:00
Brian Feldman
4524204190 Fix the problems I (and others, undoubtedly) have been having for a
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is >= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
2001-02-23 04:59:12 +00:00