sys/capability.h--this compiled fine on i386 where (int) and (ssize_t)
are the same, but broke on Alpha where they differ.
Submitted by: Mike Barcroft <mike@FreeBSD.org>
Obtained from: TrustedBSD Project
plain regular files, i.e. files with __SOPT flag set. Fix it, so ftell(stdout)
always returns the same as lseek(1, 0, 1) now.
NOTE: this bug was in original stdio code
+ The bufov vulnerability was fixed in the vendor sources.
+ The vendor sources are now POSIX [me harder] compliant.
+ The db vs. dbm files issue was fixed in the vendor sources.
__swrite() and __sseek() to higher level. According to funopen(3) they all
are just wrappers to something like standard read(2), write(2) and
lseek(2), i.e. must not touch stdio internals because they are replaceable
with any other functions knows nothing about stdio internals. See example
of funopen(3) usage in sendmail sources f.e.
NOTE: this is original stdio bug, not result of my range checkin added.
I guess I pooched the permissions on the scripts before committing them
since they're not executable and now it's too late to change (I think -
I suppose you could chmod the ,v files and it might inheirit but I don't
feel like asking the repomeisters to try that).
Noticed by: Dirk Froemberg <dirk@freebsd.org>
I don't recall why the rev 1.2 hack is needed. It looks like Amd was
already using our local headers. I no longer have a FreeBSD 2.x box to
test this on, and this will never be MFC'ed to RELENG_2_2. So lets just
decrease the maintenance effort.
+ The rev 1.4 addition was taken from a snapshot previous to 6.0.7, so
it is included in 6.0.7.
+ The vendor sources are now POSIX [me harder] compliant.
-O, which limits the impact of the write-only restriction to guest
users.
*) The existing manual page's SYNOPSIS and option listing in the
DESCRIPTION are already horribly disordered. No attempt has been
made to fix this.
*) The existing source's getopt() optstring and option handling switch
are already horribly disordered. No attempt has been made to fix
this.
Discussed with: nik, -audit
fseek -> fseeko
ftell -> ftello
NOTE: fseek/ftell not works for >long offsets per POSIX:
[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
[EOVERFLOW] For ftell ( ), the current file offset cannot be represented
correctly in an object of type long.
long -> time_t
%ld -> %qd
fseek -> fseeko
NOTE: that fseek not works for >long offsets per POSIX:
[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.