xref: /netbsd-src/sbin/fsirand/fsirand.8 (revision 95d875fb90b1458e4f1de6950286ddcd6644bc61)
1.\"	$NetBSD: fsirand.8,v 1.3 1998/06/08 12:41:43 lukem Exp $
2.\"
3.\" Copyright (c) 1997 Christos Zoulas
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"      This product includes software developed by Christos Zoulas.
17.\" 4. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.Dd March 7, 1997
32.Dt FSIRAND 8
33.Os
34.Sh NAME
35.Nm fsirand
36.Nd install random inode generation numbers in a filesystem
37.Sh SYNOPSIS
38.Nm
39.Op Fl x Ar constant
40.Op Fl p
41.Ar special
42.Sh DESCRIPTION
43.Nm
44writes random inode generation numbers for all the inodes on device
45.Ar special .
46These random numbers make the NFS filehandles less predictable, increasing
47security of exported filesystems.
48.Pp
49.Nm
50should be run on a clean and unmounted filesystem.
51.Pp
52The options are as follows:
53.Bl -tag -width indent
54.It Fl x Ar constant
55Exclusive-or the given constant with the random number used in the generation
56process.
57.It Fl p
58Print the current inode generation numbers; the filesystem is not modified.
59.El
60.Pp
61.Nm
62exits zero on success, non-zero on failure.
63.Sh SEE ALSO
64.Xr fsck_ffs 8 ,
65.Xr newfs 8
66.Sh SECURITY CONSIDERATIONS
67The current implementation does not use a good random number generator,
68so the randomization can be predicted.
69