Commit Graph

933 Commits

Author SHA1 Message Date
kleink
fc34e21eac Add an EILSEQ code (C99, first appeared in C90/AMD1), and update message
catalogs where possible.
2000-03-10 13:58:59 +00:00
itojun
959ca07b4b add hw.alignbytes sysctl mib. this gives you the value of ALIGNBYTES
at the kernel compilation time (ALIGNBYTES that the kernel uses).
2000-02-27 06:13:35 +00:00
itojun
6a433be509 remove net.inet6.ip6.nd6_proxyall sysctl.
support "ndp -s <ip6> <mac> proxy" for proxy NDP.
2000-02-26 08:48:21 +00:00
kleink
2a62a2c565 Back out previous: when statically linking executables a warning will be
displayed for the reference through __errno(), which is really wrong.
2000-02-17 21:34:21 +00:00
thorpej
25ab915071 Note net.inet.icmp.errratelimit and net.inet.tcp.rstratelimit. 2000-02-15 19:59:02 +00:00
kleink
1d34d289cf Arrange for a linker warning to be displayed when the errno datum is accessed
directly; inspired by a conversation with Havard Eidnes.
2000-02-13 21:13:01 +00:00
fair
bf004f04e9 Document KERN_LOGSIGEXIT.
sort sysctl variable list in sysctl.8
2000-02-06 07:31:23 +00:00
enami
6e75e4cb47 - Don't update the size of allocated storage until realloc successes.
- KNF left over.
2000-01-25 16:24:40 +00:00
enami
086a35e065 Use tab to indent. 2000-01-25 15:43:43 +00:00
ad
398257cba8 Change how the purpose of net.inet.tcp.log_refused is expressed so that it's
consistant with its neighbours.
2000-01-23 17:12:11 +00:00
mycroft
8c2a748a3c Doh. Remove the __weak_alias() as well... 2000-01-23 07:37:47 +00:00
mycroft
c26054b799 Delint. 2000-01-22 22:40:58 +00:00
mycroft
605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
enami
10749faeb1 - To detect realloc failure, need to check the value just returned by it.
- Free storage on realloc failure.
- Some cosmetic changes.
2000-01-20 03:15:04 +00:00
mycroft
66aa5b00fe Use strtol() to check validity of numeric values, rather than
hand-coding it.
2000-01-20 02:53:46 +00:00
itojun
293e2f2a8c warning about net.inet6.ip6.forwarding. 2000-01-19 12:30:12 +00:00
itojun
2e904aec57 make IPV6_BINDV6ONLY setsockopt available. it controls behavior of
AF_INET6 wildcard listening socket.  heavily documented in ip6(4).
net.inet6.ip6.bindv6only defines default value.  default is 1.

"options INET6_BINDV6ONLY" removes any code fragment that supports
IPV6_BINDV6ONLY == 0 case (not defopt'ed as use of this is rare).
2000-01-06 06:41:18 +00:00
itojun
97998ce539 wording fix in net.inet6.icmp6.errratelim. 2000-01-06 03:43:03 +00:00
itojun
9695855746 add missing variables under net.inet6.ip6. 2000-01-06 02:56:44 +00:00
msaitoh
40732a4308 nlist for COFF 2000-01-03 02:13:32 +00:00
itojun
07c2fe1cd9 add net.inet6.icmp6.nodeinfo sysctl.
this allows you to disable/enable ICMPv6 node information query/reply
processing (which tells remote end the gethostname(3) setting, interface
addresses on the node, and some other things - documented in
draft-ietf-ipngwg-icmp-name-lookup* or something alike).

to test it, try ping6 -w ::1 with nodeinfo=0 and nodeinfo=1.
(sync with kame change)
2000-01-02 16:31:17 +00:00
itojun
062c67829f typo fix 2000-01-02 13:34:25 +00:00
itojun
14719f6549 document PF_INET6 items (net.inet6.*). 2000-01-01 18:00:56 +00:00
explorer
cda5601f3c revert this file, the changes I made were quite unnecessary. 1999-12-10 17:27:28 +00:00
wennmach
19e89641c1 Back out last change; now vis takes care not to produce ambigous
encodings.
1999-12-07 18:26:27 +00:00
wennmach
12c643233f In SVIS, encode all characters on the extra list either in C-style
fashion (if possible) or as octal representation (else).
1999-12-07 18:20:28 +00:00
explorer
5bfb624265 Put the function prototype back. Grr. 1999-12-03 23:34:41 +00:00
explorer
bb10ce81bd Do this a bit differently.
On platforms where we can use weak aliases, use
	__weak_alias(__errno, __errno_func);
and on platforms where we cannot, just compile the function as
__errno, since on those platforms we cannot make libc thread-safe,
at least using this trick.

Are there any platforms where we cannot do __weak_alias() anymore?
1999-12-03 23:31:20 +00:00
explorer
c9227efe70 Make __errno() be a weak alias for __errno_func(), so thread packages
can actually override what plain old 'errno' looks like.
1999-12-03 23:24:33 +00:00
wennmach
cc928e80ae Make unvis and strunvis grok strings produced by svis et al. 1999-12-01 22:03:43 +00:00
wennmach
c70c65e8a1 Suggested by christos:
o unexpand spaces to tabs
o don't initialize non-static array extra[]; \0 terminate extra[]
  using an explicit assignment instead
1999-11-28 22:51:37 +00:00
lukem
a8d12b09cd * check the result of sl_init() and sl_add()
* return an error state back up the call chain and take appropriate
  action, rather than calling err() to terminate the process
1999-11-28 04:30:15 +00:00
lukem
56a2dec5a5 * check the error return of sl_init() and sl_add()
* minor KNF
1999-11-28 04:00:04 +00:00
lukem
46a687b139 * sl_init(); if malloc() fails return NULL instead of calling err(1,...)
* sl_add(); if realloc() fails return -1 instead of calling err(1,...).
  otherwise, return 0.

NOTE: this change resulted in sl_add() changing from returning void to int.
this shouldn't be a problem because a) it returns 0 if ok (aka `void', b)
all invokers of sl_add() in the tree have been changed (mainly code i've
written).
1999-11-28 03:44:09 +00:00
lukem
9f731168f6 convert to TNFi copyright (requested by christos) 1999-11-27 06:19:32 +00:00
wennmach
6a041e3a5d Added description of svis, strsvis, strsvisx.
Fixed several minor errors concerning vis, strvis, strvisx, tyops.
1999-11-25 16:52:29 +00:00
wennmach
5f9f80b825 Added new functions
char *
     svis(char *dst, int c, int flag, int nextc, const char *extra);

     int
     strsvis(char *dst, const char *src, int flag, const char *extra);

     int
     strsvisx(char *dst, const char *src, size_t len, int flag,
             const char *extra);

These functions correspond to vis(), strvis(), and strvisx() but have an
additional argument extra, pointing to a NUL terminated list of characters.
These characters will be copied encoded or backslash-escaped into dst. These
functions are useful e. g.  to remove the special meaning of certain
characters to shells.

To implement the new functions, vis underwent a major rewrite. Most functions
now use a central macro, SVIS. Performance increase ~ factor 2.

Reviewed by Christos.
1999-11-25 16:50:06 +00:00
kristerw
1276709f38 Typos (from OpenBSD) 1999-11-19 23:29:45 +00:00
is
42f95dd899 In case of an error returned by sysctl, and errno=ENOMEM, restore the
old errno and return 0. This makes us complant with SUSV2 and our own
manual page. See PR pr7836 by Simon Burge.
1999-11-18 22:12:53 +00:00
wennmach
2d27a472c9 Add some casts to u_char to get vis working again for characters > 0177
in VIS_OCTAL mode. Also, change the mask for the most significant tribble
to 03.

Reviewed by christos.

Fixes PR 8802.
1999-11-17 15:52:13 +00:00
erh
6752f572d8 Remove ELFNAME defines since they are defined in sys/exec_elf.h 1999-11-04 02:00:17 +00:00
kleink
522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
hannken
f991f0978c Undo last change. While these macros are defined in exec_elf.h, they are
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:10:36 +00:00
erh
3923b9d80e Remove ELFNAME macros which are already defined in exec_elf.h. 1999-10-21 21:12:37 +00:00
jdolecek
1374533c20 document ddb.fromconsole & DBCTL_FROMCONSOLE, description taken from options(4) 1999-10-14 09:33:51 +00:00
kleink
b884980717 Fix some formatting mistakes of mine. 1999-10-11 11:03:27 +00:00
hwr
7115c003bd Mention ipsec(4), as there are the ipsec mib variables documented. 1999-10-10 12:32:16 +00:00
jdolecek
d90b5ccdc7 rip off the signal list and xref signal(7) instead 1999-10-06 17:07:02 +00:00
bouyer
510907ed01 Document CTL_PROC, the core filename format it core(5), and xref sysctl(8),
sysctl(3), core(5) in various place.
Document 'options DEFCORENAME' inj options(4) and $defcorename in rc.conf(5).
1999-09-28 14:52:32 +00:00
kleink
4b8ee1f7d2 Move {XOPEN_SHM} from Commands & Utilities to System Interfaces. 1999-09-27 16:27:12 +00:00
kleink
c13a492388 1003.1c: add {LOGIN_NAME_MAX}. 1999-09-27 16:24:39 +00:00
jdolecek
8eb5a4184d xref symlink(7) 1999-09-26 21:18:53 +00:00
lukem
d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem
b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
lukem
d21225500f revert previous (as per klaus). will diagassert() name == NULL check instead... 1999-09-16 11:36:19 +00:00
lukem
f385db7764 check name != NULL before checking name[0] != '\0' 1999-09-16 08:12:21 +00:00
lukem
8423dd3490 implement __diagassert(). currently this just prints the assertion to
stderr and syslog()s to user.debug. (it does not abort).

XXX: implement a scheme similar to $MALLOC_OPTIONS which gives the
user control over whether to stderr, syslog, abort, do nothing, etc...
1999-09-15 23:57:21 +00:00
kleink
7d2e8d6525 Add an XSH5 ulimit()/<ulimit.h> implementation. 1999-09-13 18:38:04 +00:00
kleink
d5cfef41b5 Add the inevitable __RCSID(). 1999-09-13 18:36:02 +00:00
kleink
734b2b9b5e Add an XSH5 fmtmsg() implementation. 1999-09-12 19:04:30 +00:00
kleink
ecaa1449b5 Move the function implementations of (the non-ANSI) isascii() and toascii()
into separate modules to avoid namespace clashes.
1999-09-12 18:54:34 +00:00
kleink
03126e1c99 Use full month names with .Dd, as per mdoc.samples(7). 1999-09-12 18:47:10 +00:00
proff
fb95c8ad2b Document return values and bugs 1999-09-03 13:12:44 +00:00
mycroft
07ccaa3409 HUGE_VAL -> infinity 1999-08-29 18:55:29 +00:00
mycroft
3b800f4a61 Mention more of the special cases. 1999-08-29 18:52:18 +00:00
mycroft
9a255f2ff2 Readd my change from fts.c rev 1.10, which was incorrectly removed in rev 1.19
(HI CHRISTOS!):
Avoid extra stat()s if a link count of 1 is returned for directories but the
d_type field is filled in.
1999-08-27 21:10:46 +00:00
mycroft
4c9100d48f Adjust fts_pow2() for LP64 before Ross bricks me. 1999-08-27 20:02:14 +00:00
mycroft
ea03e67f3c GC one line of unneeded code. 1999-08-27 18:33:29 +00:00
mycroft
6b91e1fa70 Fix the comment above fts_palloc().
Also, fail with ENOMEM if fts_pathlen would overflow, rather than silently truncating the
path.
1999-08-27 18:29:08 +00:00
mycroft
8db2a166f9 Avoid memory leaks when realloc() fails (by storing the return value in a temporary, and
testing it before assigning it; fts_close(3) will deallocate the old memory).
1999-08-27 18:26:34 +00:00
mycroft
b09ec9deb8 Fix multiple problems in the FTS_NOCHDIR case:
* There was an off-by-one error that caused the addition of a NUL or slash in fts_build() to
  overwrite other memory.
* After fts_palloc(), we need to reset `cp' so that it points to the new path name buffer;
  otherwise the addition of the file name before calling fts_stat() could lose.
Also, fix stupidity in the fts_palloc() interface.  We don't want N bytes more than the
current buffer size; we want N bytes more than the current length.  Just pass in the new
size, since we can't figure it out easily here.
1999-08-27 18:01:35 +00:00
mycroft
ba3f600103 Allocate the path name buffer by powers of 2. 1999-08-27 06:17:33 +00:00
mycroft
8f599f97a7 Minor change to previous. 1999-08-26 20:28:53 +00:00
mycroft
8873459bcb Fix 3 bugs:
* When not using FTS_NOCHDIR, fts_accpath == fts_name.  fts_padjust should not
  try to move fts_accpath in this case.
* Previous entries at the same level also need to be adjusted.
* A bug was introduced in rev 1.8 (HI CHRISTOS!!) that caused the maxlen
  comparison to always fail (due to type promotions) when sp->fts_pathlen ==
  cur->fts_pathlen -- thus causing memory stompage.
1999-08-26 20:24:59 +00:00
mycroft
af3e075076 Make some needed weak aliases. 1999-08-17 03:43:59 +00:00
kleink
9208fe856f Add header file inclusion, and Xref single-precision versions. 1999-08-16 23:12:19 +00:00
fvdl
0536609b97 Keep track of the number of encountered symlinks and fail with ELOOP
if they exceed MAXSYMLINKS.
1999-08-10 13:03:11 +00:00
sommerfeld
508d2d0e9e Avoid infinite loop if pathname is longer than the maximum the kernel
is willing to return from getcwd().
(this can only happen in -current).
1999-07-11 18:01:46 +00:00
kleink
7b67bca335 Add compile-time and run-time feature test knobs for the 1003.1 Mapped Files,
Process Memory Locking, Range Memory Locking and Memory Protection options.
1999-06-24 14:18:10 +00:00
thorpej
3787c5c3d8 MAP_COPY -> MAP_PRIVATE 1999-06-17 21:09:47 +00:00
simonb
5bef8a3c65 The prototype for this is in <stdlib.h>... 1999-06-15 12:14:08 +00:00
christos
d3afd1cc44 make this compile under linux 1999-06-11 15:38:40 +00:00
christos
033ffd1215 make this compile under linux too. 1999-06-10 23:40:53 +00:00
kleink
9fa49f9cd5 Need <unistd.h> for declarations. 1999-05-26 15:39:36 +00:00
ad
ccc7e59e1f Add new sysctl (net.inet.tcp.log_refused) that when set, causes refused TCP
connections to be logged.
1999-05-23 20:33:50 +00:00
christos
11f565478e Fix unaligned access lint warning. 1999-05-03 14:35:46 +00:00
christos
c52c8cc0b1 int -> size_t problems, change do { } while (0) to for (;;) 1999-05-03 14:33:50 +00:00
ross
415d4c2f07 Fix fpgetmask.3 MLINKS braino. 1999-05-01 22:45:57 +00:00
ross
c5a82dd848 * New MI man page for fp{set,get}{round,sticky,mask}(3).
* Implement fpgetsticky() for alpha.
* Direct fpsetsticky() and fp{get,set}mask() into alpha kernel via sysarch(2).
* Define new sysarch(2) stub for above and install and distribute sysarch.h
for alpha.  (The fpcr IS user mode r/w, but for reasons beyond the scope
of a commit message kernel calls are needed.) And much kernel Magick is
required before these do anything, but this way programs compiled under
1.4 will DTRT on future snapshots and releases.
1999-04-30 00:58:30 +00:00
ross
c36a5f5190 Unconditionalize `rval' declaration referenced in usr.bin/chpass/ via .PATH 1999-04-27 06:08:58 +00:00
lukem
df8debb219 change dns_getpw() to skip dodgy entries when doing getpwent(), rather
than returning NS_UNAVAIL. this means that a -ve uid entry in hesiod
doesn't stop getpwent() in its tracks. it also brings it in line with
how nis_getpw() works as well in this situation.
problem tracked down (with much pain & suffereing) by simonb.

XXX: we currently have no support for -ve uids, and this is painful in
XXX: hetrogenous environment... (this -ve check is enforced in __pwscan())
1999-04-26 04:01:32 +00:00
lukem
61ae8b4739 document duplicate suppression 1999-04-25 14:56:10 +00:00
lukem
253fa5cc72 suppress duplicate gids (e.g, when multiple sources are given in
nsswitch.conf and they contain similar information).

XXX: in the case where the given array is too small and -1 is returned,
the returned ngroups will be too large by a factor of the difference
between the given size and the number of matches. this is not considered
to be a major problem, since it's still going to be a smaller figure than
what the previous (non suppressive) behaviour returned.
1999-04-25 14:47:46 +00:00
lukem
d438433458 * highlight that getgrent() doesn't suppress duplicate info from multiple
nsswitch.conf sources
* consistently refer to `functions', rather than occasionally referring
  to them as `routines'.
1999-04-25 13:47:37 +00:00
lukem
83e7ae6c5d * highlight that getpwent() doesn't suppress duplicate info from multiple
nsswitch.conf sources
* consistently refer to `functions', rather than occasionally referring
  to them as `routines'.
1999-04-25 13:45:02 +00:00
lukem
326483c4de change getgrent() backends so that a flag (per source) is set once the
source has been exhausted. this allows getgrent() across multiple
sources (e.g, ``group: files nis'') to work correctly. the flags are
reset in setgrent()/endgrent().

(as per similar change in getpwent.c rev 1.42)

XXX: this change means that code that uses getgrent() to obtain a list
of groups will have to do duplicate suppression... getgrouplist()
springs to mind; i'm about to modify that
1999-04-25 13:39:41 +00:00
lukem
a8743ef778 change getpwent() backends so that a flag (per source) is set once the
source has been exhausted. this allows getpwent() across multiple
sources (e.g, ``passwd: files nis'') to work correctly. the flags are
reset in setpassent()/endpwent().

this fixes a bug noted in [lib/7449] by thorpej, and tracked down to
getpwent() as being the culprit by simonb.
1999-04-25 07:54:01 +00:00
lukem
73e9ef01be specifically include stdarg/varargs.h 1999-04-18 02:04:04 +00:00
drochner
2c6db68a95 remove unused label 1999-04-08 17:07:02 +00:00
pk
1cd395375d 1, 2, 3 and.. 4! 1999-04-06 20:24:37 +00:00