160536Spendry.\"
2*66474Sbostic.\" Copyright (c) 1993, 1994
362953Sbostic.\"	The Regents of the University of California.  All rights reserved.
460536Spendry.\" All rights reserved.
560536Spendry.\"
660536Spendry.\" This code is derived from software donated to Berkeley by
760536Spendry.\" Jan-Simon Pendry.
860536Spendry.\"
960536Spendry.\" %sccs.include.redist.roff%
1060536Spendry.\"
11*66474Sbostic.\"	@(#)mount_portal.8	8.3 (Berkeley) 03/27/94
1260536Spendry.\"
1360536Spendry.\"
1460536Spendry.Dd
1560536Spendry.Dt MOUNT_PORTAL 8
1660536Spendry.Os BSD 4.4
1760536Spendry.Sh NAME
1860536Spendry.Nm mount_portal
1960536Spendry.Nd mount the portal daemon
2060536Spendry.Sh SYNOPSIS
2160536Spendry.Nm mount_portal
22*66474Sbostic.Op Fl o Ar options
23*66474Sbostic.Ar /etc/portal.conf
24*66474Sbostic.Ar mount_point
2560536Spendry.Sh DESCRIPTION
2660536SpendryThe
2760536Spendry.Nm mount_portal
2860536Spendrycommand attaches an instance of the portal daemon
2960536Spendryto the global filesystem namespace.
3060536SpendryThe conventional mount point is
3160536Spendry.Pa /p .
3260536Spendry.PA /dev .
3360536SpendryThis command is normally executed by
3460536Spendry.Xr mount 8
3560536Spendryat boot time.
3660536Spendry.Pp
37*66474SbosticThe options are as follows:
38*66474Sbostic.Bl -tag -width indent
39*66474Sbostic.It Fl o
40*66474SbosticOptions are specified with a
41*66474Sbostic.Fl o
42*66474Sbosticflag followed by a comma separated string of options.
43*66474SbosticSee the
44*66474Sbostic.Xr mount 8
45*66474Sbosticman page for possible options and their meanings.
46*66474Sbostic.El
47*66474Sbostic.Pp
4860536SpendryThe portal daemon provides an
4965162Spendry.Em open
5060536Spendryservice.
5160536SpendryObjects opened under the portal mount point are
5260536Spendrydynamically created by the portal daemon according
5360536Spendryto rules specified in the named configuration file.
5460536SpendryUsing this mechanism allows descriptors such as sockets
5560536Spendryto be made available in the filesystem namespace.
5660536Spendry.Pp
5760536SpendryThe portal daemon works by being passed the full pathname
5860536Spendryof the object being opened.
5960536SpendryThe daemon creates an appropriate descriptor according
6060536Spendryto the rules in the configuration file, and then passes the descriptor back
6160536Spendryto the calling process as the result of the open system call.
6260536Spendry.Sh NAMESPACE
6360536SpendryBy convention, the portal daemon divides the namespace into sub-namespaces,
6460536Spendryeach of which handles objects of a particular type.
6560536Spendry.Pp
6665162SpendryCurrently, two sub-namespaces are implemented:
6760536Spendry.Pa tcp
6860536Spendryand
6960536Spendry.Pa fs .
7060536SpendryThe
7160536Spendry.Pa tcp
7260536Spendrynamespace takes a hostname and a port (slash separated) and
7360536Spendrycreates an open TCP/IP connection.
7460536SpendryThe
7560536Spendry.Pa fs
7660536Spendrynamespace opens the named file, starting back at the root directory.
7760536SpendryThis can be used to provide a controlled escape path from
7860536Spendrya chrooted environment.
7960536Spendry.Sh "CONFIGURATION FILE"
8060536SpendryThe configuration file contains a list of rules.
8160536SpendryEach rule takes one line and consists of two or more
8260536Spendrywhitespace separated fields.
8360536SpendryA hash (``#'') character causes the remainder of a line to
8460536Spendrybe ignored.  Blank lines are ignored.
8560536Spendry.Pp
8660536SpendryThe first field is a pathname prefix to match
8760536Spendryagainst the requested pathname.
8860536SpendryIf a match is found, the second field
8960536Spendrytells the daemon what type of object to create.
9060536SpendrySubsequent fields are passed to the creation function.
9160536Spendry.Bd -literal
9260536Spendry# @(#)portal.conf	5.1 (Berkeley) 7/13/92
9360536Spendrytcp/		tcp tcp/
9460536Spendryfs/		file fs/
9560536Spendry.Ed
9660536Spendry.Sh FILES
9760536Spendry.Bl -tag -width /p/* -compact
9860536Spendry.It Pa /p/*
9960536Spendry.El
10060536Spendry.Sh SEE ALSO
10160536Spendry.Xr mount 2 ,
10260536Spendry.Xr unmount 2 ,
103*66474Sbostic.Xr fstab 5 ,
104*66474Sbostic.Xr mount 8
10560536Spendry.Sh CAVEATS
10660536SpendryThis filesystem may not be NFS-exported.
10760536Spendry.Sh HISTORY
10860536SpendryThe
10962952Sbostic.Nm mount_portal
11062952Sbosticutility first appeared in 4.4BSD.
111