18f89943eSGuido van Rooij.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> 28f89943eSGuido van Rooij.\" All rights reserved. 38f89943eSGuido van Rooij.\" 48f89943eSGuido van Rooij.\" Redistribution and use in source and binary forms, with or without 58f89943eSGuido van Rooij.\" modification, are permitted provided that the following conditions 68f89943eSGuido van Rooij.\" are met: 78f89943eSGuido van Rooij.\" 1. Redistributions of source code must retain the above copyright 88f89943eSGuido van Rooij.\" notice, this list of conditions and the following disclaimer. 98f89943eSGuido van Rooij.\" 2. Redistributions in binary form must reproduce the above copyright 108f89943eSGuido van Rooij.\" notice, this list of conditions and the following disclaimer in the 118f89943eSGuido van Rooij.\" documentation and/or other materials provided with the distribution. 128f89943eSGuido van Rooij.\" 3. All advertising materials mentioning features or use of this software 13c27b7badSPhilippe Charnier.\" must display the following acknowledgment: 148f89943eSGuido van Rooij.\" This product includes software developed by Todd C. Miller. 158f89943eSGuido van Rooij.\" 4. The name of the author may not be used to endorse or promote products 168f89943eSGuido van Rooij.\" derived from this software without specific prior written permission. 178f89943eSGuido van Rooij.\" 188f89943eSGuido van Rooij.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 198f89943eSGuido van Rooij.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 208f89943eSGuido van Rooij.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 218f89943eSGuido van Rooij.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 228f89943eSGuido van Rooij.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 238f89943eSGuido van Rooij.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 248f89943eSGuido van Rooij.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 258f89943eSGuido van Rooij.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 268f89943eSGuido van Rooij.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 278f89943eSGuido van Rooij.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 288f89943eSGuido van Rooij.\" 298f89943eSGuido van Rooij.\" $OpenBSD: fsirand.8,v 1.6 1997/02/23 03:58:26 millert Exp $ 308f89943eSGuido van Rooij.\" 318f89943eSGuido van Rooij.Dd January 25, 1997 328f89943eSGuido van Rooij.Dt FSIRAND 8 338f89943eSGuido van Rooij.Os 348f89943eSGuido van Rooij.Sh NAME 358f89943eSGuido van Rooij.Nm fsirand 368f89943eSGuido van Rooij.Nd randomize inode generation numbers 378f89943eSGuido van Rooij.Sh SYNOPSIS 387c7fb079SRuslan Ermilov.Nm 398f89943eSGuido van Rooij.Op Fl b 408f89943eSGuido van Rooij.Op Fl f 418f89943eSGuido van Rooij.Op Fl p 428f89943eSGuido van Rooij.Ar special 438f89943eSGuido van Rooij.Op Ar "special ..." 448f89943eSGuido van Rooij.Sh DESCRIPTION 458f89943eSGuido van RooijThe 46c27b7badSPhilippe Charnier.Nm 47e1205e80SPhilippe Charnierutility installs random generation numbers on all the inodes for 488f89943eSGuido van Rooijeach file system specified on the command line by 498f89943eSGuido van Rooij.Ar special . 508f89943eSGuido van RooijThis increases the security of NFS-exported file systems by making 518f89943eSGuido van Rooijit difficult to ``guess'' filehandles. 528f89943eSGuido van Rooij.Pp 53a654c53eSRuslan Ermilov.Em Note : 548f89943eSGuido van Rooij.Xr newfs 8 558f89943eSGuido van Rooijnow does the equivalent of 568f89943eSGuido van Rooij.Nm 57dd99c429SMike Pritcharditself so it is no longer necessary to 588f89943eSGuido van Rooijrun 598f89943eSGuido van Rooij.Nm 609806e231SRuslan Ermilovby hand on a new file system. 619806e231SRuslan ErmilovIt is only used to 628f89943eSGuido van Rooijre-randomize or report on an existing file system. 638f89943eSGuido van Rooij.Pp 64e1205e80SPhilippe CharnierThe 65e1205e80SPhilippe Charnier.Nm 66e1205e80SPhilippe Charnierutility should only be used on an unmounted file system that 678f89943eSGuido van Rooijhas been checked with 688f89943eSGuido van Rooij.Xr fsck 8 698f89943eSGuido van Rooijor a file system that is mounted read-only. 70e1205e80SPhilippe CharnierThe 71e1205e80SPhilippe Charnier.Nm 72e1205e80SPhilippe Charnierutility may be used on the root file system in single-user mode 738f89943eSGuido van Rooijbut the system should be rebooted via ``reboot -n'' afterwards. 748f89943eSGuido van Rooij.Sh OPTIONS 758f89943eSGuido van RooijThe available options are as follows: 762914feebSUlrich Spörlein.Bl -tag -width indent 778f89943eSGuido van Rooij.It Fl b 78e71e7150SMike PritchardUse the default block size (usually 512 bytes) instead 798f89943eSGuido van Rooijof the value gleaned from the disklabel. 808f89943eSGuido van Rooij.It Fl f 818f89943eSGuido van RooijForce 828f89943eSGuido van Rooij.Nm 838f89943eSGuido van Rooijto run even if the file system on 848f89943eSGuido van Rooij.Ar special 858f89943eSGuido van Rooijis not marked as clean. 868f89943eSGuido van Rooij.It Fl p 878f89943eSGuido van RooijPrint the current generation numbers for all inodes instead of 888f89943eSGuido van Rooijgenerating new ones. 891252c1bbSRuslan Ermilov.El 908f89943eSGuido van Rooij.Sh SEE ALSO 918f89943eSGuido van Rooij.Xr fs 5 , 928f89943eSGuido van Rooij.Xr fsck 8 , 93c27b7badSPhilippe Charnier.Xr newfs 8 948f89943eSGuido van Rooij.Sh HISTORY 958f89943eSGuido van RooijThe 968f89943eSGuido van Rooij.Nm 97e1205e80SPhilippe Charnierutility appeared in SunOS 3.x. 98726b61abSRuslan Ermilov.Pp 998f89943eSGuido van RooijThis version of 1008f89943eSGuido van Rooij.Nm 1018f89943eSGuido van Rooijfirst appeared in 102e71e7150SMike Pritchard.Ox 2.1 . 103726b61abSRuslan Ermilov.Pp 104e71e7150SMike PritchardA 105f050f700SMike Pritchard.Fx 106e71e7150SMike Pritchardversion first appeared in 107f55f3f46SMike Pritchard.Fx 2.2.5 . 10868085a0eSPhilippe Charnier.Sh AUTHORS 109*bd0891ceSBaptiste Daroussin.An Todd C. Miller Aq Mt Todd.Miller@courtesan.com 1100afc94c1SUlrich Spörlein.Sh CAVEATS 1110afc94c1SUlrich SpörleinSince 1120afc94c1SUlrich Spörlein.Nm 1130afc94c1SUlrich Spörleinallocates enough memory to hold all the inodes in 1140afc94c1SUlrich Spörleina given cylinder group it may use a large amount 1150afc94c1SUlrich Spörleinof memory for large disks with few cylinder groups. 116