Home | History | Annotate | only in /src/sbin/fsirand
History log of /src/sbin/fsirand
RevisionDateAuthorComments
 1.9 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.8 27-Jun-2005  christos Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
 1.7 20-Jan-2005  xtraeme Remove main() prototype; WARNS=3
 1.6 19-Aug-2002  lukem Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
 1.5 16-Nov-2001  lukem change -F semantics to treat the argument as a file system image; open it
`as-is' without attempting to determine the device name with opendisk(3),
and don't attempt to read a disklabel.
 1.4 03-Aug-2001  lukem WARNS=2
 1.3 15-Jan-1999  bouyer #include machine/bswap.h and remove -lutil.
 1.2 18-Mar-1998  bouyer Add support for non-native byteorder FFS.
 1.1 07-Mar-1997  christos First pass at fsirand. Needs /dev/random to do things right.
 1.11 28-Mar-2024  riastradh fsirand(8): Fix security claims.

PR misc/58063
 1.10 11-Sep-2016  sevan branches: 1.10.16; 1.10.24;
Document author and the version fsirand appeared.
Bump date.
 1.9 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8 14-Jun-2005  peter branches: 1.8.20; 1.8.22;
Remove the SECURITY CONSIDERATIONS section which stated that the
implementation didn't used a good random generator, this is not true
anymore since arc4random(3) is used these days.

Pointed out by Jeff Ito in PR/30321
 1.7 16-Nov-2001  lukem change -F semantics to treat the argument as a file system image; open it
`as-is' without attempting to determine the device name with opendisk(3),
and don't attempt to read a disklabel.
 1.6 19-Aug-2001  lukem - add -F - manipulate a file system image in a regular file (instead of
a special device).
- implement statistics printing on SIGINFO
 1.5 05-Jun-2001  wiz Remove some trailing whitespace.
 1.4 04-Feb-2001  christos fix nested extern. While I am here assign copyright to TNF.
 1.3 08-Jun-1998  lukem Implement a new manual page category ``SECURITY CONSIDERATIONS''
(suggested by mycroft)
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* prefix hex numbers with '0x'
 1.1 07-Mar-1997  christos First pass at fsirand. Needs /dev/random to do things right.
 1.8.22.1 18-May-2008  yamt sync with head.
 1.8.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.24.1 24-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #807):

usr.sbin/mountd/exports.5: revision 1.33
usr.sbin/mountd/exports.5: revision 1.34
sbin/fsirand/fsirand.8: revision 1.11
usr.sbin/mountd/exports.5: revision 1.35
usr.sbin/mountd/exports.5: revision 1.36
usr.sbin/mountd/mountd.8: revision 1.43
usr.sbin/mountd/exports.5: revision 1.37
usr.sbin/mountd/exports.5: revision 1.38

exports(5), mountd(8): First pass at clarifying export semantics.

The exports(5) man page is full of walls of turgid prose that should
be itemized lists with syntax templates, and I'm itching to rewrite
it, but let's get the security-relevant warnings out of the way
first.
PR misc/58063

exports(5): Revert warning about `-ro' on read/write file systems.

Looks like the nfs server does enforce that after all, in spite of
the rather oblique commentary in the BUGS section about export
options being tied to local mount point options with which they must
be noncontradictory.

And there's no reason in principle it shouldn't enforce this -- it
just need to block various file system _operations_, rather than the
subtree issue where the criteria for evaluating whether operations
are allowed on particular _file handles_ are too painful to
contemplate.

PR misc/58063

exports(5): Substantially rewrite for clarity.

Hope this is an improvement over the turgid paragraphs all about
first/second/third cases of everything.
PR misc/58063

exports(5): improve mark up

fsirand(8): Fix security claims.
PR misc/58063
pick some nits

exports(5): Tiny punctuation fix in man page.
 1.10.16.1 24-Aug-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1882):

usr.sbin/mountd/exports.5: revision 1.33
usr.sbin/mountd/exports.5: revision 1.34
sbin/fsirand/fsirand.8: revision 1.11
usr.sbin/mountd/exports.5: revision 1.35
usr.sbin/mountd/exports.5: revision 1.36
usr.sbin/mountd/mountd.8: revision 1.43
usr.sbin/mountd/exports.5: revision 1.37
usr.sbin/mountd/exports.5: revision 1.38

exports(5), mountd(8): First pass at clarifying export semantics.

The exports(5) man page is full of walls of turgid prose that should
be itemized lists with syntax templates, and I'm itching to rewrite
it, but let's get the security-relevant warnings out of the way
first.
PR misc/58063

exports(5): Revert warning about `-ro' on read/write file systems.

Looks like the nfs server does enforce that after all, in spite of
the rather oblique commentary in the BUGS section about export
options being tied to local mount point options with which they must
be noncontradictory.

And there's no reason in principle it shouldn't enforce this -- it
just need to block various file system _operations_, rather than the
subtree issue where the criteria for evaluating whether operations
are allowed on particular _file handles_ are too painful to
contemplate.

PR misc/58063

exports(5): Substantially rewrite for clarity.

Hope this is an improvement over the turgid paragraphs all about
first/second/third cases of everything.
PR misc/58063

exports(5): improve mark up

fsirand(8): Fix security claims.
PR misc/58063
pick some nits

exports(5): Tiny punctuation fix in man page.
 1.33 17-Nov-2022  chs Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems
from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended
attributes in the process).
 1.32 19-Oct-2013  christos fix unused variable warnings.
 1.31 23-Jun-2013  dholland fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
 1.30 19-Jun-2013  dholland Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.29 27-Aug-2011  joerg branches: 1.29.2; 1.29.8;
static + __dead
 1.28 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.27 08-Feb-2007  drochner branches: 1.27.12; 1.27.14;
include <signal.h> where signal(3) is used
 1.26 02-Jun-2005  lukem appease gcc -Wuninitialized
 1.25 20-Jan-2005  xtraeme Remove main() prototype; WARNS=3
 1.24 21-Mar-2004  dsl Don't use 1st alternate superblock at offset 64k for ffsv1.
Fixes part of PR kern/24809
 1.23 05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.22 06-Sep-2003  itojun use arc4random
 1.21 17-Apr-2003  lukem clear errno before strto(u)l() if we're going to test it for ERANGE afterwards
 1.20 02-Apr-2003  fvdl Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
 1.19 08-Jan-2002  lukem need ufs/ufs/dinode.h for ufs/ffs/fs.h
 1.18 16-Nov-2001  lukem this doesn't need <ufs/ufs/inode.h>
 1.17 16-Nov-2001  lukem change -F semantics to treat the argument as a file system image; open it
`as-is' without attempting to determine the device name with opendisk(3),
and don't attempt to read a disklabel.
 1.16 26-Oct-2001  lukem remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former. leave the former
in source that obviously uses specific bits of it (for completeness.)
 1.15 19-Aug-2001  lukem - add -F - manipulate a file system image in a regular file (instead of
a special device).
- implement statistics printing on SIGINFO
 1.14 17-Aug-2001  lukem remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right. invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B" to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.
 1.13 29-Jul-2001  lukem ansi knf, WARNS=2
 1.12 19-Feb-2001  cgd convert to use getprogname()
 1.11 04-Feb-2001  christos fix nested extern. While I am here assign copyright to TNF.
 1.10 23-Oct-1998  thorpej branches: 1.10.10;
Use DINODE_SIZE instead of sizeof(struct dinode) and/or pointer arithmetic.
 1.9 25-Aug-1998  ross from Erik Bertelsen <erik@mediator.uni-c.dk>
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
 1.8 18-Mar-1998  bouyer Add support for non-native byteorder FFS.
 1.7 20-Sep-1997  christos Work around ggc-2.7.2 off_t initialization bug on m68k.
 1.6 14-Sep-1997  lukem * cleanup for WARNS=1
* prefix hex numbers with '0x'
 1.5 06-Jul-1997  mycroft Fix type error that caused offset to wrap at 4GB.
 1.4 24-Jun-1997  kleink * add `-x' option to usage().
* `=' vs. `==' in a comparison.
 1.3 14-Mar-1997  cgd string.h for protos
 1.2 08-Mar-1997  cgd Fix NetBSD RCS ID tag
 1.1 07-Mar-1997  christos First pass at fsirand. Needs /dev/random to do things right.
 1.10.10.1 25-Nov-2001  he Pull up revision 1.14 (requested by lukem):
Call ffs_sb_swap() with the correct arguments. Fixes problems
with using other-endian file systems.
 1.27.14.1 18-May-2008  yamt sync with head.
 1.27.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.8.1 23-Jun-2013  tls resync from head
 1.29.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed