Commit Graph

1046 Commits

Author SHA1 Message Date
enami
9e0ad09c03 Cosmetic changes (including ANSI'fy). 2001-09-19 01:14:51 +00:00
enami
b2e798fd44 Remove unnecessary alloca, strcpy and strlen call. 2001-09-19 01:07:19 +00:00
christos
eb7e2c7da8 From Brian Ginsbach: Fix overflow detection, and only abort on long paths
when GLOB_ERR is set.
2001-09-18 16:37:26 +00:00
simonb
aaa0df1add Use alloca() instead of malloc() and strdup(). Proper fix for the find
problem posted to current-users@netbsd.org.  Solution suggested by a
couple of folks on that mailing list, and Art Grabowski who pointed me
at a similar change in OpenBSD.
2001-09-18 05:09:37 +00:00
wiz
09a03cd887 Standardize section headers, sort sections, sort SEE ALSO, punctuation
and misc. fixes.
2001-09-16 02:57:03 +00:00
wiz
a0dbe70b74 Boring whitespace fixes. 2001-09-16 02:30:23 +00:00
simonb
e8bf848218 Unwrap a line that wasn't >80 characters long before it was wrapped. 2001-09-15 15:43:40 +00:00
christos
20abba463b Selected fixes from Brian Ginsbach <ginsbach@cray.com>, modified by me.
- handle globbing of patterns that contain unmatched braces. Globbing
  a pattern "foo{" in a directory that contains "foo{" now works.
- check for MAXPATHLEN overflows during filename generation (security problem).
- Posix/XOpen fixes to always return GLOB_ABORTED when a directory open fails
  or when a file access fails.
- pathc was not initialized to 0 in one case.
Also
- rename err to error, so that it does not conflict with the libc function.
2001-09-08 22:39:21 +00:00
lukem
9839c99d92 fstabscan() fixes:
- if _fs_fstab.fs_type is NULL, the line is incorrect, so warn about it
  rather than trying to deference a NULL pointer.
  fixes [bin/13787] by Dave Burgess.
- clear _fs_fstab before each use (just to be sure)
2001-08-31 00:31:07 +00:00
groo
37ffb3b127 begin executed --> being executed 2001-08-22 20:18:08 +00:00
atatat
49d53cd636 Build a single retry into syslog() so that if someone restarted
syslogd after we called openlog(), we don't just to lose until we call
openlog() again.  Or get restarted.  This is good for long running
processes that use syslog(), like sendmail, postfix, named, etc.
2001-07-30 04:12:33 +00:00
christos
3911c122ef add fts_safe_changedir() function and use it everywhere.
Idea from Todd Miller <millert@openbsd.org>
2001-07-09 21:33:03 +00:00
simonb
1704d52d02 Don't need to include <string.h> unless REALLY_SET_PROGNAME is true. 2001-07-09 00:58:22 +00:00
simonb
9bcd87074c Don't need to include <string.h>. 2001-07-09 00:57:58 +00:00
mrg
5812b2fe67 avoid an underrun in "buf". noted by dean@huxley.org in PR#13292 2001-06-25 15:34:08 +00:00
christos
e4ad645398 oops, make sure we close the file descriptor... 2001-06-06 14:10:46 +00:00
christos
4a37917f04 Fix problem reported by Kris Kennaway <kris@obsecurity.org>; In
the default case fts(3) uses chdir("..") to ascend the tree. The
sequence of chdir's can be intercepted by a malicious user who
moves a subtree that fts is currently traversing to a higher level,
thus making fts operate outside it's original starting directory.
2001-06-05 17:05:11 +00:00
wiz
8810d7f022 Whitespace fixes, punctuation fix, NetBSD -> Nx. 2001-06-05 13:25:57 +00:00
wiz
e93878b173 Uppercase Dt argument, fix AUTHORS section name. 2001-06-05 12:18:10 +00:00
wiz
cacd6836b5 Uppercase Dt argument, fix typos, remove an empty line. 2001-06-05 12:16:23 +00:00
kleink
b93e84a4ee Fix return value interval; from Tadayuki OKADA in PR lib/12984. 2001-05-23 01:08:50 +00:00
kleink
15318b7678 Internally rename sysconf() to __sysconf() to make its latter name suitable
for use from public headers.  Also, do so on all platforms.
2001-05-07 17:25:57 +00:00
matt
78aee7b9ec Enable ELF32 support for VAX. 2001-05-03 08:23:13 +00:00
kleink
08c6392504 Need <limits.h> in _CTYPE_PRIVATE environments. 2001-04-17 20:12:31 +00:00
toshii
e81e43cbf6 KERN_RTC_OFFSET sysctl has been readonly. 2001-04-12 07:20:39 +00:00
christos
4331e2615e Fix sentinel for the buffer in globtilde. It was off by x 2. Noted by Theo. 2001-04-03 14:50:37 +00:00
wiz
feb5cd7b0b Remove trailing space from comment line. 2001-04-02 18:27:13 +00:00
kleink
d665068674 Emit a link warning for the old timezone() interface; from Nick Hudson. 2001-03-31 19:13:00 +00:00
kleink
a495a577a0 Finally deprecate the old timezone() interface in favor of an XSH5
timezone/daytime pair; as proposed by J.T. in September, 1996.
Fixes PR standards/11807 by Nick Hudson.
2001-03-31 18:29:20 +00:00
christos
c5da7a4cfa try to make this compile on 1.4.x 2001-03-28 22:53:40 +00:00
christos
5bc6f3f69d deal with buffer overflows for fixed length buffers. 2001-03-28 22:13:06 +00:00
christos
6f6e7c44eb KNF. no functional differences. 2001-03-28 21:16:48 +00:00
itojun
4b72eeeee5 net.inet.ip.maxfragpackets defines the maximum size of ip reass queue
(prevents fragment flood from chewing up mbuf memory space).
derived from KAME net.inet6.ip6.maxfragpackets.
2001-03-27 02:24:38 +00:00
cgd
1da7909939 clean up a bit, xref exit(3), and suggest use of EXIT_FAILURE. 2001-03-22 01:47:17 +00:00
christos
317bb0ea2f set gl_pathv to NULL after we free it. 2001-03-18 22:40:20 +00:00
christos
93b3db97f3 limit the amount of memory used, not the number of arguments used. 2001-03-16 21:09:05 +00:00
christos
f913546a2e Implement GLOB_LIMIT that limits number of matches to ARG_MAX. 2001-03-16 20:34:08 +00:00
lukem
c9cccc1354 reference <stdarg.h> not <varargs.h>, and separate out the synopsis
for vsyslog(3) from the rest after <stdarg.h>, as per printf(3)/vsprintf(3)
2001-03-14 06:12:35 +00:00
simonb
61bb060b34 Include <string.h> for memcpy() prototype. 2001-03-12 03:20:10 +00:00
cgd
b42009b570 actually, don't define SHQUOTE_USE_MULTIBYTE 2001-03-10 22:37:54 +00:00
christos
fc701562b4 make these lint properly.
1. don't use MB_CUR_MAX, but MB_LEN_MAX because MB_CUR_MAX is a variable.
2. return a size_t type.
3. added const cond on do while macros.
4. remove unused variables and code,
2001-03-10 20:54:53 +00:00
cgd
360514740c Add shquote() and shquotev(). From the manual page:
The shquote() and shquotev() functions copy strings and transform the
     copies by adding shell escape and quoting characters.  They are used to
     encapsulate arguments to be included in command strings passed to the
     system() and popen() functions, so that the arguments will have the cor-
     rect values after being evaluated by the shell.
2001-03-10 01:51:49 +00:00
cgd
82f3142780 fix NetBSD RCS id tags 2001-02-27 19:04:39 +00:00
cgd
6ec85a49fd nuke a last-minute addition in the getprogname() cleanup that didn't work. 2001-02-20 01:17:37 +00:00
cgd
6b25d77513 convert from __progname to getprogname() 2001-02-19 22:22:16 +00:00
cgd
337d03ef63 add cross-reff to getprogname(3) 2001-02-19 22:20:15 +00:00
cgd
dd482e4f34 add getprogname() and setprogname() 2001-02-19 22:14:20 +00:00
cgd
21202a2cb3 add getprogname() and setprogname(). These allow uses of __progname to
be wrapped in some sane fashion, for portability.
2001-02-19 22:13:23 +00:00
bjh21
d47ff437ed Make both ARM ports support both NLIST_AOUT and NLIST_ELF32. 2001-02-17 21:18:40 +00:00
briggs
4d91dcef0e Remove extra #include. 2001-02-10 05:36:35 +00:00
itojun
109fcc5522 implement upper limit to icmp6 redirects (experimental, turned off)
negative value to {mtudisc,redirect}_{hi,lo}wat will turn off the limitation.
sync with kame.
2001-02-08 16:07:39 +00:00
itojun
22b473e0f6 during ip6/icmp6 inbound packet processing, do not call log() nor printf() in
normal operation (/var can get filled up by flodding bogus packets).
sysctl net.inet6.icmp6.nd6_debug will turn on diagnostic messages.
(#define ND6_DEBUG will turn it on by default)

improve stats in ND6 code.

lots of synchronziation with kame (including comments and cometic ones).
2001-02-07 08:59:47 +00:00
hubertf
44d7ee0289 * Document the vendor.* sysctl branch
* in sysctl.3, sort the list of CTL_ prefixes and sync with sysctl.h
2001-01-10 03:03:02 +00:00
lukem
aa330a1e25 * Change __diagassert13() so that by default it only syslogs the error (it
used to syslog and also send to stderr).

  This behaviour can be changed by setting $LIBC_DIAGASSERT to a
  string containing one or more of the following letters:
	a	abort() after syslog and/or print to stderr
	A	opposite of a
	e	print assertion message to stderr
	E	opposite of e
	l	log assertion message to syslog
	L	opposite of l

  This allows per-process control of the _DIAGASSERT() behaviour (e.g,
  if you want to abort() after the assertion is raised) by modifying the
  environment before starting the process.

  Note that __DIAGASSERT() is still a no-op unless libc is compiled
  with -D_DIAGNOSTIC.

* Implement __assert()/__diagassert() by calling __assert13()/__diagassert13()
  with a function of NULL, reducing unnecessary code duplication
2001-01-03 12:44:53 +00:00
martin
7c10055175 Be consistent with argument types vs. prototype; use _BSD_VA_LIST_ as
the argument, instead of va_list. Might not make a difference on most
ports, depending on toolchain/MD typedefs. Does make a difference on sparc64,
where it wouldn't compile otherwise.
2000-12-30 16:27:33 +00:00
itojun
8f5f80ebfe document net.inet6.icmp6.mtudisc_{lo,hi}wat. 2000-12-21 01:10:52 +00:00
christos
c9f588eab4 fix nested extern 2000-12-20 20:54:30 +00:00
christos
5b7386b25e fix missing formatting escape. 2000-12-19 21:17:16 +00:00
kleink
f02540ff10 C99: Print the name of the function enclosing the assertion, if possible. 2000-12-19 14:32:59 +00:00
lukem
741ea8dc94 fix typo in _nis_grscan(). "if (data); free(data);" -> "if (data) free(data);"
noted by Jacques Vidrine <nectar@FreeBSD.org>
2000-12-17 22:09:12 +00:00
briggs
9875721d50 Fix an old typo: s/ket_t/key_t/ 2000-12-12 17:07:49 +00:00
christos
f92dc9c439 unnest nested extern declaration. 2000-12-10 03:59:00 +00:00
christos
a2df081a7e -Wredundant-declarations does not like nested extern declarations. 2000-12-10 03:52:16 +00:00
matt
f1ac0dd6e1 The prototype for fmtcheck is in <stdio.h> so we'd better include it. 2000-11-16 02:10:18 +00:00
lukem
279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
christos
119c9cb003 add a lint comment. 2000-11-05 20:05:29 +00:00
briggs
2c5b165052 fmtcheck() should be declared as fmtcheck(), not __fmtcheck().
The weak_alias is __fmtcheck().  matt@3am-software.com pointed this out
as a problem when trying to build on a vax.
2000-11-01 01:17:20 +00:00
jdolecek
1c7d8af31d rewrite KERN_MAXPTYS description to match reality 2000-10-26 07:24:00 +00:00
briggs
d00ebb12e9 Add {__,}fmtcheck(), a function specified by Bill Sommerfeld to check
a user-supplied format string against a fallback format string to ensure
that they will consume arguments of the same type.

libc minor bump for new API entry point.
2000-10-20 18:46:05 +00:00
erh
2686020623 Squash lint errors by using size_t instead of u_int to avoid differing sizes of data. 2000-10-16 04:12:55 +00:00
enami
32554376a3 Reset allocated buffer size to 0 on allocation failure. 2000-10-03 03:22:26 +00:00
simonb
cac9995776 Fix potential buffer overflow processing long password database entries.
Inspired by similar OpenBSD change.
2000-10-02 19:25:32 +00:00
msaitoh
f9b799b651 check LIBC_SCCS 2000-09-13 22:32:25 +00:00
jdolecek
f973bb5351 document kern.maxptys/KERN_MAXPTYS
note that kern.maxvnodes is raise only
2000-09-09 17:06:34 +00:00
wennmach
821c7e766b Added MLINKS for svis, strsvis, and strsvisx 2000-08-29 10:49:09 +00:00
kleink
051d885a24 {OPEN_MAX} does not apply to a user but a single process; noticed by Brook
Milligan on current-users.
2000-08-29 06:38:23 +00:00
itojun
152da24bd9 implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable. 2000-08-26 11:03:45 +00:00
itojun
3c7320bedf document net.inet.ip.lowport{min,max} 2000-08-26 11:00:41 +00:00
soren
7eaf9092e8 Typo. 2000-08-21 23:23:23 +00:00
enami
630f9b81c9 - Test allocation failure.
- Don't leave a pointer dangling on failure case.
- Don't leak a file descriptor on failure case.
2000-08-07 06:08:33 +00:00
enami
2e68d337ae Nuke redundant test (though, gcc optimizer was clever enough not to emit
redundant code).
2000-08-07 06:00:59 +00:00
enami
d753bcdd59 - Wrap long lines.
- Protect multi-statement macro with do {} while (0)
2000-08-07 05:56:11 +00:00
kml
782cdefc52 Correct the documentation for SACK; although we have some preliminary
code in the tree, it doesn't do anything, and setting the sack sysctl
won't have any effect.
2000-08-04 13:31:54 +00:00
itojun
951f2bac77 pps rate limitation can be turned off by negative value. 2000-08-02 12:26:54 +00:00
itojun
1048b82bf1 nuke net.inet*.ip*.*ratelimit. 2000-07-28 04:08:44 +00:00
itojun
348dcd5529 add net.inet.tcp.rstppslimit 2000-07-27 11:37:46 +00:00
ad
682d5ce7b8 Xr passwd.conf 2000-07-11 12:12:53 +00:00
itojun
6ab897e3e4 document sysctl variable "net.inet.icmp.errppslimit". 2000-07-10 09:34:38 +00:00
itojun
f39dc46bcd add desription for net.inet6.icmp6.{errppslimit,nd6_maxnudhint}. 2000-07-09 13:29:44 +00:00
itohy
7daefc5a5a Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems.  On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems.  However, we leave the isascii()
untouched for now, so as not to change the current behavior.
2000-07-07 08:03:36 +00:00
christos
a74cfaaa6e mark the prototype mismatch as linted. We cannot do better because of the
widening ansi rules.
2000-07-06 02:49:41 +00:00
msaitoh
f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
enami
a6af5d3169 - One more s/vm/uvm/ substitution.
- Sort SEE ALSO list first by section.
2000-07-03 06:23:33 +00:00
mrg
c293541954 remove include of <vm/vm.h> 2000-06-29 06:31:44 +00:00
thorpej
445d18ed28 Implement FNM_CASEFOLD, for matching the pattern in a case-insensitive
way.  Flag name taken from glibc.
2000-06-28 01:13:35 +00:00
mrg
a461faa506 <vm/vm_param.h> is now <uvm/uvm_param.h> 2000-06-27 09:10:24 +00:00
mrg
ad91bba6a6 we now need <uvm/uvm_param.h> 2000-06-26 15:37:26 +00:00
simonb
53cf69f2ef Document KERN_MSGBUF sysctl. 2000-06-16 00:45:48 +00:00
cgd
db755e7c76 sweep of my licenses (userland files w/o only my copyright) for
consistency.  (no functional changes)
2000-06-14 17:24:02 +00:00
cgd
d220ca5ba3 fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
2000-06-14 06:48:47 +00:00