1.\" $NetBSD: fsirand.8,v 1.11 2024/03/28 15:39:42 riastradh Exp $ 2.\" 3.\" Copyright (c) 1997 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Christos Zoulas. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd September 11, 2016 31.Dt FSIRAND 8 32.Os 33.Sh NAME 34.Nm fsirand 35.Nd install random inode generation numbers in a filesystem 36.Sh SYNOPSIS 37.Nm 38.Op Fl F 39.Op Fl p 40.Op Fl x Ar constant 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, which 47was once thought to increase security of exported file systems. 48.Pp 49.Nm 50is no longer relevant because 51.Xr newfs 8 52has randomized inode generation numbers on all new file systems since 53.Nx 2.0 , 54and in any case, exporting a file system to NFS clients allows them to 55traverse the entire file system, so making filehandles less predictable 56does not prevent clients from finding them anyway. 57.Pp 58.Nm 59should be run on a clean and unmounted filesystem. 60.Pp 61The options are as follows: 62.Bl -tag -width indent 63.It Fl F 64Indicates that 65.Ar special 66is a file system image, rather than a device name. 67.Ar special 68will be accessed 69.Sq as-is , 70without requiring that it is a raw character device and without 71attempting to read a disklabel. 72.It Fl p 73Print the current inode generation numbers; the filesystem is not modified. 74.It Fl x Ar constant 75Exclusive-or the given constant with the random number used in the generation 76process. 77.El 78.Pp 79.Nm 80exits zero on success, non-zero on failure. 81.Pp 82If 83.Nm 84receives a 85.Dv SIGINFO 86signal, statistics on the amount of work completed and estimated 87completion time (in minutes:seconds) will be written to the standard 88error output. 89.Sh SEE ALSO 90.Xr fsck_ffs 8 , 91.Xr newfs 8 92.Sh HISTORY 93A 94.Nm 95utility appeared in 96.Nx 1.3 . 97.Sh AUTHORS 98.An Christos Zoulas Aq Mt christos@NetBSD.org . 99