1.\" 2.\" Copyright (c) 1993, 1994 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.3 (Berkeley) 03/27/94 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 o Ar options 23.Ar /etc/portal.conf 24.Ar 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 options are as follows: 38.Bl -tag -width indent 39.It Fl o 40Options are specified with a 41.Fl o 42flag followed by a comma separated string of options. 43See the 44.Xr mount 8 45man page for possible options and their meanings. 46.El 47.Pp 48The portal daemon provides an 49.Em open 50service. 51Objects opened under the portal mount point are 52dynamically created by the portal daemon according 53to rules specified in the named configuration file. 54Using this mechanism allows descriptors such as sockets 55to be made available in the filesystem namespace. 56.Pp 57The portal daemon works by being passed the full pathname 58of the object being opened. 59The daemon creates an appropriate descriptor according 60to the rules in the configuration file, and then passes the descriptor back 61to the calling process as the result of the open system call. 62.Sh NAMESPACE 63By convention, the portal daemon divides the namespace into sub-namespaces, 64each of which handles objects of a particular type. 65.Pp 66Currently, two sub-namespaces are implemented: 67.Pa tcp 68and 69.Pa fs . 70The 71.Pa tcp 72namespace takes a hostname and a port (slash separated) and 73creates an open TCP/IP connection. 74The 75.Pa fs 76namespace opens the named file, starting back at the root directory. 77This can be used to provide a controlled escape path from 78a chrooted environment. 79.Sh "CONFIGURATION FILE" 80The configuration file contains a list of rules. 81Each rule takes one line and consists of two or more 82whitespace separated fields. 83A hash (``#'') character causes the remainder of a line to 84be ignored. Blank lines are ignored. 85.Pp 86The first field is a pathname prefix to match 87against the requested pathname. 88If a match is found, the second field 89tells the daemon what type of object to create. 90Subsequent fields are passed to the creation function. 91.Bd -literal 92# @(#)portal.conf 5.1 (Berkeley) 7/13/92 93tcp/ tcp tcp/ 94fs/ file fs/ 95.Ed 96.Sh FILES 97.Bl -tag -width /p/* -compact 98.It Pa /p/* 99.El 100.Sh SEE ALSO 101.Xr mount 2 , 102.Xr unmount 2 , 103.Xr fstab 5 , 104.Xr mount 8 105.Sh CAVEATS 106This filesystem may not be NFS-exported. 107.Sh HISTORY 108The 109.Nm mount_portal 110utility first appeared in 4.4BSD. 111