1.\"
2.\" Copyright (c) 1993
3.\"	The Regents of the University of California.  All rights reserved.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software donated to Berkeley by
7.\" Jan-Simon Pendry.
8.\"
9.\" %sccs.include.redist.roff%
10.\"
11.\"	@(#)mount_portal.8	8.1 (Berkeley) 06/09/93
12.\"
13.\"
14.Dd
15.Dt MOUNT_PORTAL 8
16.Os BSD 4.4
17.Sh NAME
18.Nm mount_portal
19.Nd mount the portal daemon
20.Sh SYNOPSIS
21.Nm mount_portal
22.Op Fl F fsoptions
23.Pa /etc/portal.conf
24.Pa mount_point
25.Sh DESCRIPTION
26The
27.Nm mount_portal
28command attaches an instance of the portal daemon
29to the global filesystem namespace.
30The conventional mount point is
31.Pa /p .
32.PA /dev .
33This command is normally executed by
34.Xr mount 8
35at boot time.
36.Pp
37The portal daemon provides an
38.I open
39service.
40Objects opened under the portal mount point are
41dynamically created by the portal daemon according
42to rules specified in the named configuration file.
43Using this mechanism allows descriptors such as sockets
44to be made available in the filesystem namespace.
45.Pp
46The portal daemon works by being passed the full pathname
47of the object being opened.
48The daemon creates an appropriate descriptor according
49to the rules in the configuration file, and then passes the descriptor back
50to the calling process as the result of the open system call.
51.Sh NAMESPACE
52By convention, the portal daemon divides the namespace into sub-namespaces,
53each of which handles objects of a particular type.
54.Pp
55Current, two sub-namespaces are implemented:
56.Pa tcp
57and
58.Pa fs .
59The
60.Pa tcp
61namespace takes a hostname and a port (slash separated) and
62creates an open TCP/IP connection.
63The
64.Pa fs
65namespace opens the named file, starting back at the root directory.
66This can be used to provide a controlled escape path from
67a chrooted environment.
68.Sh "CONFIGURATION FILE"
69The configuration file contains a list of rules.
70Each rule takes one line and consists of two or more
71whitespace separated fields.
72A hash (``#'') character causes the remainder of a line to
73be ignored.  Blank lines are ignored.
74.Pp
75The first field is a pathname prefix to match
76against the requested pathname.
77If a match is found, the second field
78tells the daemon what type of object to create.
79Subsequent fields are passed to the creation function.
80.Bd -literal
81# @(#)portal.conf	5.1 (Berkeley) 7/13/92
82tcp/		tcp tcp/
83fs/		file fs/
84.Ed
85.Sh FILES
86.Bl -tag -width /p/* -compact
87.It Pa /p/*
88.El
89.Sh SEE ALSO
90.Xr mount 2 ,
91.Xr unmount 2 ,
92.Xr fstab 5
93.Sh CAVEATS
94This filesystem may not be NFS-exported.
95.Sh HISTORY
96The
97.Nm mount_portal
98utility first appeared in 4.4BSD.
99