| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The documentation for mrand48 and lrand48 is mixed up.
mrand48 returns a full 32 bit number, while lrand48 only returns
31 bits.
|
|
|
|
|
|
| |
Reviewed by:
Submitted by:
Obtained from: 1.1.5.1 with a few modifictaions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getcwd() has two off-by-one bugs in FreeBSD-2.0:
1. getcwd(buf, size) fails when the size is just large enough.
2. getcwd(buf + 1, 1) incorrectly succeeds when the current directory
is "/". buf[0] and buf[2] are clobbered.
(I modified Bruce's original patch to return the proper error code
[ERANGE] in the case of #2, but otherwise... -DG)
This program demonstrates the bug:
---
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
int main(void)
{
char buf[5];
int errors;
errors = 0;
if (chdir("/tmp") != 0) {
perror("chdir");
abort();
}
if (getcwd(buf, 5) == NULL) {
perror("oops, getcwd failed for buffer size = size required");
++errors;
}
if (chdir("/") != 0) {
perror("chdir");
abort();
}
buf[0] = 0;
buf[2] = 1;
if (getcwd(buf + 1, 1) != NULL) {
fprintf(stderr,
"oops, getcwd succeeded for buffer size = one too small\n");
++errors;
}
if (buf[0] != 0) {
fprintf(stderr,
"oops, getcwd scribbled on memory before start of buffer\n");
++errors;
}
if (buf[2] != 1) {
fprintf(stderr,
"oops, getcwd scribbled on memory after end of buffer\n");
++errors;
}
exit(errors == 0 ? 0 : 1);
}
|
|
|
|
|
|
| |
Compare unsigned chars.
Return the place after where the character was found and not the start
of the string.
|
|
|
|
|
|
|
|
| |
pointer returned by realloc(). All callers free the pointer if the
execve fails. Nuke the caching. This essentially restores buildargv()
to the 1.1.5 version. Also fix a memory leak if realloc() fails. Also
nuke similar but non-broken caching in execvp(). malloc() should be
efficient enough.
|
|
|
|
|
|
|
| |
command available yet.
Changed an entry in getprcent.3 from rpcinfo(8C) to rpcinfo(8).
Changed an entry in getrpcport.3 from 3R to 3.
Changed two entries in rpc.3 from 3N to 3.
|
|
|
|
| |
other manpages and there is no conflict.
|
|
|
|
|
|
| |
incredibly obnoxious, but also makes inverse mappings work when the local
resolver is in a cache-only configuration. (Maybe this is actually
a bug in BIND?)
|
|
|
|
|
|
| |
pointer if len is 0. I should have looked at the revision history - I would
have found that Bruce already fixed the bug with len=0 over a month ago.
Whoever said that the bug was in 2.0 was wrong.
|
| |
|
|
|
|
|
|
|
| |
for Wine support. The current snapshot of wine works fine with this.
This should go into the beta as the code which it calls in the kernel is
already there, and works fine.
|
|
|
|
|
|
|
|
|
|
|
| |
later be applied to a number of programs (inetd for instance) to clean
out the bogus code doing the same thing, modulus all the bugs.
If you need to read a '#'-is-a-comment-file, please use these routines.
I realize that the shlib# should be bumped (for the non-US world:
increased by something), but will defer this until something significant
happens.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Chris Torek <torek@bsdi.com>
Here is a semi-official patch (apply to /usr/src/lib/libc/stdio/fseek.c,
rebuild libc, install). The current code fails when the seek:
- is optimized, and
- is to just past the end of the block currently in the buffer, and
- is followed by another seek with no intervening read operation, and
- the destination of subsequent seek is within the block left in the
buffer (seeking to the beginning of a block does not force a read,
so the buffer still contains the previous block)
so it is indeed rather obscure.
I may have a different `final' fix, as this one `loses' the buffer
contents on a seek that goes just past the end of the current block.
[Footnote: seeks are optimized only on read-only opens of regular
files that are buffered by the file's optimal I/O size. This is
what you get with fopen(path, "r") and no call to setvbuf().]
Obtained from: [ BSDI mailing list ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to figure out why rlogind wasn't working right for root,
I noticed that man wouldn't come back with a man page for iruserok, but
it would for ruserok. Checking the lib/net directory's Makefile.inc
file shows that the link to the rcmd man page just isn't getting
created.
>How-To-Repeat:
Do a 'man iruserok' and notihing will come back, where a 'man ruserok'
will.
Submitted by: Brian Moore <ziff@houdini.eecs.umich.edu>
Obtained from: NetBSD-bugs mailing list
|
| |
|
|
|
|
| |
to match setjmp.S.
|
|
|
|
|
| |
that calls setjmp(), since returning from the function usually
clobbers the saved environment.
|
|
|
|
| |
Set IGNPAR, clear NOFLSH, PENDIN, TOSTOP, ECHOE, ECHOK
|
| |
|
| |
|
| |
|
|
|
|
|
| |
fields in the utsname structure are too small to hold their
corresponding MIB variables. Don't return an error in this case.
|
| |
|
| |
|
|
|
|
|
|
| |
getnet* configuration. (It's highly unlikely that you'd want to do
something different, and network lookups aren't common enough to justify
their own configuration file.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
get hosed: vfsisloadable() always returns false if /dev/lkm cannot be
opened for writing.
|
|
|
|
|
| |
split modules to bring only neccessary functions,
eliminate sprintf, make reduced startup_locale version.
|
| |
|
|
|
|
| |
updated their kernels yet.
|
|
|
|
| |
variable. This one's even documented!
|
|
|
|
| |
Obtained from: 1.1.5
|
|
|
|
| |
modules lying around.
|
|
|
|
|
| |
representation. Original code by pst but ported in as part of
enhancements to BIND 4.9.2 and returned to Vixie.
|
| |
|
|
|
|
|
| |
endvfsent, vfsisloadable, vfsload.
Someday these will even be documented.
|
| |
|
|
|
|
| |
password file support done yesterday.
|
|
|
|
| |
database in order to operate.
|
|
|
|
| |
correctly handles +user entries and + entries with local overrides.
|
|
|
|
|
|
|
|
|
|
|
| |
!!!!!!!!
NB
!!!!!!!!
You MUST pwd_mkdb /etc/master.passwd before attempting to use the new
libc, or things may go wrong. (I doubt anything actually /will/ go
wrong, but the actual behavior is undefined. YOU HAVE BEEN WARNED.)
The database format is, however, backwards-compatible, so old executables
will still work.
|
|
|
|
|
|
| |
with all pgms, you can imagine results!
Change 'gethostname' -> 'ntp_gettime', I don't know what real name
must be here but try to guess.
|
| |
|
| |
|
|
|
|
|
| |
4.4. The code is almost identical to the 4.4 versions, but this organization
should make it easier to merge new versions in the future.
|
| |
|