1994-05-26 06:35:07 +00:00
|
|
|
.\" Copyright (c) 1992, 1993, 1994
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software donated to Berkeley by
|
|
|
|
.\" Jan-Simon Pendry and from John Heidemann of the UCLA Ficus project.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1997-03-11 12:40:45 +00:00
|
|
|
.\" @(#)mount_umap.8 8.4 (Berkeley) 5/1/95
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 06:35:07 +00:00
|
|
|
.\"
|
1997-06-23 04:03:49 +00:00
|
|
|
.Dd May 1, 1995
|
2001-05-23 14:58:19 +00:00
|
|
|
.Dt MOUNT_UMAPFS 8
|
|
|
|
.Os
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh NAME
|
2001-05-23 14:58:19 +00:00
|
|
|
.Nm mount_umapfs
|
2002-08-21 18:11:48 +00:00
|
|
|
.Nd sample file system layer
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 16:52:27 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
.Op Fl o Ar options
|
1998-05-13 08:02:50 +00:00
|
|
|
.Fl u Ar uid-mapfile
|
|
|
|
.Fl g Ar gid-mapfile
|
1994-05-26 06:35:07 +00:00
|
|
|
.Ar target
|
|
|
|
.Ar mount-point
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
1998-07-15 06:12:32 +00:00
|
|
|
.Nm
|
2002-08-21 18:11:48 +00:00
|
|
|
utility is used to mount a sub-tree of an existing file system
|
1994-05-26 06:35:07 +00:00
|
|
|
that uses a different set of uids and gids than the local system.
|
2002-08-21 18:11:48 +00:00
|
|
|
Such a file system could be mounted from a remote site via NFS or
|
|
|
|
it could be a file system on removable media brought from some
|
1994-05-26 06:35:07 +00:00
|
|
|
foreign location that uses a different password file.
|
|
|
|
.Pp
|
|
|
|
The
|
1998-07-15 06:12:32 +00:00
|
|
|
.Nm
|
2002-07-06 19:34:18 +00:00
|
|
|
utility uses a set of files provided by the user to make correspondences
|
1994-05-26 06:35:07 +00:00
|
|
|
between uids and gids in the sub-tree's original environment and
|
2004-07-02 21:45:06 +00:00
|
|
|
some other set of ids in the local environment.
|
|
|
|
For instance, user
|
1994-05-26 06:35:07 +00:00
|
|
|
smith might have uid 1000 in the original environment, while having
|
2004-07-02 21:45:06 +00:00
|
|
|
uid 2000 in the local environment.
|
|
|
|
The
|
1998-07-15 06:12:32 +00:00
|
|
|
.Nm
|
2002-07-06 19:34:18 +00:00
|
|
|
utility allows the subtree from smith's original environment to be
|
1994-05-26 06:35:07 +00:00
|
|
|
mapped in such a way that all files with owning uid 1000 look like
|
2001-07-15 07:53:42 +00:00
|
|
|
they are actually owned by uid 2000.
|
1994-05-26 06:35:07 +00:00
|
|
|
.Pp
|
1998-07-15 06:12:32 +00:00
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl o
|
|
|
|
Options are specified with a
|
|
|
|
.Fl o
|
|
|
|
flag followed by a comma separated string of options.
|
|
|
|
See the
|
|
|
|
.Xr mount 8
|
|
|
|
man page for possible options and their meanings.
|
2001-07-15 07:53:42 +00:00
|
|
|
.It Ar target
|
1998-07-15 06:12:32 +00:00
|
|
|
Should be the current location of the sub-tree in the
|
2001-07-15 07:53:42 +00:00
|
|
|
local system's name space.
|
|
|
|
.It Ar mount-point
|
1998-07-15 06:12:32 +00:00
|
|
|
Should be a directory
|
2001-07-15 07:53:42 +00:00
|
|
|
where the mapped subtree is to be placed.
|
|
|
|
.It Fl u Ar uid-mapfile
|
|
|
|
.It Fl g Ar gid-mapfile
|
1998-07-15 06:12:32 +00:00
|
|
|
Describe the mappings to be made between identifiers.
|
1994-05-26 06:35:07 +00:00
|
|
|
Briefly, the format of these files is a count of the number of
|
|
|
|
mappings on the first line, with each subsequent line containing
|
2004-07-02 21:45:06 +00:00
|
|
|
a single mapping.
|
|
|
|
Each of these mappings consists of an id in
|
1998-05-13 08:01:00 +00:00
|
|
|
the local environment and the corresponding id from the original environment,
|
2001-07-15 07:53:42 +00:00
|
|
|
separated by white space.
|
|
|
|
.Ar Uid-mapfile
|
1994-05-26 06:35:07 +00:00
|
|
|
should contain all uid
|
2001-07-15 07:53:42 +00:00
|
|
|
mappings, and
|
|
|
|
.Ar gid-mapfile
|
1994-05-26 06:35:07 +00:00
|
|
|
should contain all gid mappings.
|
2001-07-15 07:53:42 +00:00
|
|
|
Any uids not mapped in
|
|
|
|
.Ar uid-mapfile
|
1994-05-26 06:35:07 +00:00
|
|
|
will be treated as user NOBODY,
|
2001-07-15 07:53:42 +00:00
|
|
|
and any gids not mapped in
|
|
|
|
.Ar gid-mapfile
|
1994-05-26 06:35:07 +00:00
|
|
|
will be treated as group
|
2004-07-02 21:45:06 +00:00
|
|
|
NULLGROUP.
|
|
|
|
At most 64 uids can be mapped for a given subtree, and
|
1994-05-26 06:35:07 +00:00
|
|
|
at most 16 groups can be mapped by a given subtree.
|
1998-07-15 06:12:32 +00:00
|
|
|
.El
|
1994-05-26 06:35:07 +00:00
|
|
|
.Pp
|
|
|
|
The mapfiles can be located anywhere in the file hierarchy, but they
|
2001-07-15 07:53:42 +00:00
|
|
|
must be owned by root, and they must be writable only by root.
|
2002-07-06 19:34:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility will refuse to map the sub-tree if the ownership or permissions on
|
2004-07-02 21:45:06 +00:00
|
|
|
these files are improper.
|
|
|
|
It will also balk if the count of mappings
|
1994-05-26 06:35:07 +00:00
|
|
|
in the first line of the map files is not correct.
|
|
|
|
.Pp
|
|
|
|
The layer created by the
|
1998-07-15 06:12:32 +00:00
|
|
|
.Nm
|
2002-08-21 18:11:48 +00:00
|
|
|
utility is meant to serve as a simple example of file system layering.
|
2004-07-02 21:45:06 +00:00
|
|
|
It is not meant for production use.
|
|
|
|
The implementation is not very
|
1994-05-26 06:35:07 +00:00
|
|
|
sophisticated.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mount 8 ,
|
2001-05-23 14:58:19 +00:00
|
|
|
.Xr mount_nullfs 8
|
1998-12-22 11:52:10 +00:00
|
|
|
.Sh BUGS
|
2002-12-12 17:26:04 +00:00
|
|
|
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
2004-07-02 21:45:06 +00:00
|
|
|
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM.
|
|
|
|
USE AT YOUR
|
|
|
|
OWN RISK.
|
|
|
|
BEWARE OF DOG.
|
|
|
|
SLIPPERY WHEN WET.
|
2000-12-18 15:16:24 +00:00
|
|
|
.Pp
|
1998-12-22 11:52:10 +00:00
|
|
|
This code also needs an owner in order to be less dangerous - serious
|
2001-08-13 16:33:00 +00:00
|
|
|
hackers can apply by sending mail to
|
|
|
|
.Aq hackers@FreeBSD.org
|
|
|
|
and announcing
|
1998-12-22 11:52:10 +00:00
|
|
|
their intent to take it over.
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1998-07-15 06:12:32 +00:00
|
|
|
.Nm
|
1996-08-23 20:36:11 +00:00
|
|
|
utility first appeared in
|
|
|
|
.Bx 4.4 .
|