Deleted Added
full compact
hlfsd.8 (81251) hlfsd.8 (107788)
1.\"
2.\" Copyright (c) 1997-1999 Erez Zadok
3.\" Copyright (c) 1989 Jan-Simon Pendry
4.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5.\" Copyright (c) 1989 The Regents of the University of California.
6.\" All rights reserved.
7.\"
8.\" This code is derived from software contributed to Berkeley by
9.\" Jan-Simon Pendry at Imperial College, London.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\" notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\" notice, this list of conditions and the following disclaimer in the
18.\" documentation and/or other materials provided with the distribution.
19.\" 3. All advertising materials mentioning features or use of this software
20.\" must display the following acknowledgment:
21.\" This product includes software developed by the University of
22.\" California, Berkeley and its contributors.
23.\" 4. Neither the name of the University nor the names of its contributors
24.\" may be used to endorse or promote products derived from this software
25.\" without specific prior written permission.
26.\"
27.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37.\" SUCH DAMAGE.
38.\"
39.\" $Id: hlfsd.8,v 1.2 1999/01/10 21:54:32 ezk Exp $
1.\"
2.\" Copyright (c) 1997-1999 Erez Zadok
3.\" Copyright (c) 1989 Jan-Simon Pendry
4.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5.\" Copyright (c) 1989 The Regents of the University of California.
6.\" All rights reserved.
7.\"
8.\" This code is derived from software contributed to Berkeley by
9.\" Jan-Simon Pendry at Imperial College, London.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\" notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\" notice, this list of conditions and the following disclaimer in the
18.\" documentation and/or other materials provided with the distribution.
19.\" 3. All advertising materials mentioning features or use of this software
20.\" must display the following acknowledgment:
21.\" This product includes software developed by the University of
22.\" California, Berkeley and its contributors.
23.\" 4. Neither the name of the University nor the names of its contributors
24.\" may be used to endorse or promote products derived from this software
25.\" without specific prior written permission.
26.\"
27.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37.\" SUCH DAMAGE.
38.\"
39.\" $Id: hlfsd.8,v 1.2 1999/01/10 21:54:32 ezk Exp $
40.\" $FreeBSD: head/contrib/amd/hlfsd/hlfsd.8 81251 2001-08-07 15:48:51Z ru $
40.\" $FreeBSD: head/contrib/amd/hlfsd/hlfsd.8 107788 2002-12-12 17:26:04Z ru $
41.\"
42.\" HLFSD was written at Columbia University Computer Science Department, by
43.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
44.\" It is distributed under the same terms and conditions as AMD.
45.\"
46.Dd September 14, 1993
47.Dt HLFSD 8
48.Os
49.Sh NAME
50.Nm hlfsd
51.Nd home-link file system daemon
52.Sh SYNOPSIS
53.Nm
54.Op Fl fhnpvC
55.Op Fl a Ar alt_dir
56.Bk -words
57.Op Fl c Ar cache-interval
58.Ek
59.Op Fl g Ar group
60.Bk -words
61.Op Fl i Ar reload-interval
62.Ek
63.Op Fl l Ar logfile
64.Bk -words
65.Op Fl o Ar mount-options
66.Op Fl x Ar log-options
67.Op Fl D Ar debug-options
68.Op Fl P Ar password-file
69.Ek
70.Op linkname Op subdir
71.Sh DESCRIPTION
72.Nm
41.\"
42.\" HLFSD was written at Columbia University Computer Science Department, by
43.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
44.\" It is distributed under the same terms and conditions as AMD.
45.\"
46.Dd September 14, 1993
47.Dt HLFSD 8
48.Os
49.Sh NAME
50.Nm hlfsd
51.Nd home-link file system daemon
52.Sh SYNOPSIS
53.Nm
54.Op Fl fhnpvC
55.Op Fl a Ar alt_dir
56.Bk -words
57.Op Fl c Ar cache-interval
58.Ek
59.Op Fl g Ar group
60.Bk -words
61.Op Fl i Ar reload-interval
62.Ek
63.Op Fl l Ar logfile
64.Bk -words
65.Op Fl o Ar mount-options
66.Op Fl x Ar log-options
67.Op Fl D Ar debug-options
68.Op Fl P Ar password-file
69.Ek
70.Op linkname Op subdir
71.Sh DESCRIPTION
72.Nm
73is a daemon which implements a filesystem containing a symbolic link to
73is a daemon which implements a file system containing a symbolic link to
74subdirectory within a user's home directory, depending on the user
75which accessed that link. It was primarily designed to redirect
76incoming mail to users' home directories, so that it can read from
77anywhere.
78.Pp
79.Nm
80operates by mounting itself as an
81.Tn NFS
82server for the directory containing
83.Ar linkname ,
84which defaults to
85.Pa /hlfs/home .
86Lookups within that directory are handled by
87.Nm hlfsd ,
88which uses the password map to determine how to resolve the lookup. The
89directory will be created if it doesn't already exist. The symbolic link will
90be to the accessing user's home directory, with
91.Ar subdir
92appended to it. If not specified,
93.Ar subdir
94defaults to
95.Pa .hlfsdir .
96This directory will also be created if it does not already exist.
97.Pp
98A
99.Er SIGHUP
100will flush the internal caches, and reload the password map. It will also
101close and reopen the log file, to enable the original log file to be removed
102or rotated. A
103.Er SIGUSR1
104will cause it to dump its internal table of user IDs and home directories to
105the file
106.Pa /usr/tmp/hlfsd.dump.XXXXXX .
107.Sh OPTIONS
108.Bl -tag -width Ds
109.It Fl a Ar alt_dir
110Alternate directory. The name of the directory to which
111the symbolic link returned by
112.Nm
113will point, if it cannot access the home directory of the user. This
114defaults to
115.Pa /var/hlfs .
116This directory will be created if it doesn't exist. It is expected
117that either users will read these files, or the system administrators
118will run a script to resend this
119.Dq lost mail
120to its owner.
121.It Fl c Ar cache-interval
122Caching interval.
123.Nm
124will cache the validity of home directories for this interval, in
125seconds. Entries which have been verified within the last
126.Ar cache-interval
127seconds will not be verified again, since the operation could
128be expensive, and the entries are most likely still valid.
129After the interval has expired,
130.Nm
131will re-verify the validity of the user's home directory, and
132reset the cache time-counter. The default value for
133.Ar cache-interval
134is 300 seconds
135(5 minutes).
136.It Fl f
137Force fast startup. This option tells
138.Nm
139to skip startup-time consistency checks such as existence of mount
140directory, alternate spool directory, symlink to be hidden under the
141mount directory, their permissions and validity.
142.It Fl g Ar group
143Set the special group
144.Va HLFS_GID
145to
146.Ar group .
147Programs such as
148.Ic comsat ,
149(which access the mailboxes of other users)
150must be setgid
151.Va HLFS_GID
152to work properly. The default group is
153.Dq hlfs .
154If no group is provided, and there is no group
155.Dq hlfs ,
156this feature is disabled.
157.It Fl h
158Help. Print a brief help message, and exit.
159.It Fl i Ar reload-interval
160Map-reloading interval. Each
161.Ar reload-interval
162seconds,
163.Nm
164will reload the password map.
165.Nm
166needs the password map for the UIDs and home directory pathnames.
167.Nm
168schedules a
169.Va SIGALRM
170to reload the password maps. A
171.Va SIGHUP
172sent to
173.Nm
174will force it to reload the maps immediately. The default value for
175.Ar reload-interval
176is 900 seconds
177(15 minutes).
178.It Fl l Ar logfile
179Specify a log file to which
180.Nm
181will record events. If
182.Pa logfile
183is the string
184.Pa syslog
185then the log messages will be sent to the system log daemon by
186.Xr syslog 3 ,
187using the
188.Va LOG_DAEMON
189facility. This is also the default.
190.It Fl n
191No verify.
192.Nm
193will not verify the validity of the symbolic link it will be
194returning, or that the user's home directory contains
195sufficient disk-space for spooling. This can speed up
196.Nm
197at the cost of possibly returning symbolic links to home
198directories which are not currently accessible or are full.
199By default,
200.Nm
201validates the symbolic-link in the background.
202The
203.Fl n
204option overrides the meaning of the
205.Fl c
206option, since no caching is necessary.
207.It Fl o Ar mount-options
208Mount options. Mount options which
209.Nm
210will use to mount itself on top of
211.Pa dirname .
212By default,
213.Ar mount-options
214is set to
215.Qq ro .
216If the system supports symbolic-link caching, default
217options are set to
218.Qq ro,nocache .
219.It Fl p
220Prints
221.Va PID .
222Outputs the process-id of
223.Nm
224to standard output where it can be saved into a file.
225.It Fl v
226Version. Displays version information to standard error.
227.It Fl x Ar log-options
228Specify run-time logging options. The options are a comma separated
229list chosen from: fatal, error, user, warn, info, map, stats, all.
230.It Fl C
231Force
232.Nm
233to run on systems that cannot turn off the NFS attribute-cache. Use of
234this option on those systems is discouraged, as it may result in loss
235or misdelivery of mail. The option is ignored on systems that can turn
236off the attribute-cache.
237.It Fl D Ar log-options
238Select from a variety of debugging options. Prefixing an
239option with the string
240.Qq no
241reverses the effect of that option. Options are cumulative.
242The most useful option is
243.Em all .
244Since this option is only used for debugging other options are not
245documented here. A fuller description is available in the program
246source. A
247.Va SIGUSR1
248sent to
249.Nm
250will cause it to dump its internal password map to the file
251.Pa /usr/tmp/hlfsd.dump.XXXXXX .
252.It Fl P Ar password-file
253Read the user-name, user-id, and home directory information from the file
254.Ar password-file .
255Normally,
256.Nm
257will use
258.Xr getpwent 3
259to read the password database. This option allows you to override the
260default database, and is useful if you want to map users' mail files to a
261directory other than their home directory. Only the username, uid, and
262home-directory fields of the file
263.Ar password-file
264are read and checked. All other fields are ignored. The file
265.Ar password-file
266must be compliant with
267.Ux
268System 7 colon-delimited format
269.Xr passwd 5 .
270.El
271.Sh FILES
272.Bl -tag -width /axx
273.It Pa /hlfs
274directory under which
275.Nm
276mounts itself and manages the symbolic link
277.Pa home .
278.It Pa .hlfsdir
279default sub-directory in the user's home directory, to which the
280.Pa home
281symbolic link returned by
282.Nm
283points.
284.It Pa /var/hlfs
285directory to which
286.Pa home
287symbolic link returned by
288.Nm
289points if it is unable to verify the that
290user's home directory is accessible.
291.El
292.Sh SEE ALSO
293.Xr mail 1 ,
294.Xr getgrent 3 ,
295.Xr getpwent 3 ,
296.Xr mtab 5 ,
297.Xr passwd 5 ,
298.Xr amd 8 ,
299.Xr cron 8 ,
300.Xr mount 8 ,
301.Xr sendmail 8 ,
302.Xr umount 8
303.Rs
304.%T HLFSD: Delivering Email to Your $HOME
305.%B Proc. LISA-VII, The 7th Usenix System Administration Conference
306.%D November 1993
307.Re
308.Sh AUTHORS
309.An Erez Zadok Aq ezk@cs.columbia.edu ,
310Department of Computer Science, Columbia University,
311New York, USA.
312.Pp
313.An Alexander Dupuy Aq dupuy@smarts.com ,
314System Management ARTS, White Plains, New York, USA.
315.Sh HISTORY
316The
317.Nm
318utility appeared in
319.Fx 3.0 .
74subdirectory within a user's home directory, depending on the user
75which accessed that link. It was primarily designed to redirect
76incoming mail to users' home directories, so that it can read from
77anywhere.
78.Pp
79.Nm
80operates by mounting itself as an
81.Tn NFS
82server for the directory containing
83.Ar linkname ,
84which defaults to
85.Pa /hlfs/home .
86Lookups within that directory are handled by
87.Nm hlfsd ,
88which uses the password map to determine how to resolve the lookup. The
89directory will be created if it doesn't already exist. The symbolic link will
90be to the accessing user's home directory, with
91.Ar subdir
92appended to it. If not specified,
93.Ar subdir
94defaults to
95.Pa .hlfsdir .
96This directory will also be created if it does not already exist.
97.Pp
98A
99.Er SIGHUP
100will flush the internal caches, and reload the password map. It will also
101close and reopen the log file, to enable the original log file to be removed
102or rotated. A
103.Er SIGUSR1
104will cause it to dump its internal table of user IDs and home directories to
105the file
106.Pa /usr/tmp/hlfsd.dump.XXXXXX .
107.Sh OPTIONS
108.Bl -tag -width Ds
109.It Fl a Ar alt_dir
110Alternate directory. The name of the directory to which
111the symbolic link returned by
112.Nm
113will point, if it cannot access the home directory of the user. This
114defaults to
115.Pa /var/hlfs .
116This directory will be created if it doesn't exist. It is expected
117that either users will read these files, or the system administrators
118will run a script to resend this
119.Dq lost mail
120to its owner.
121.It Fl c Ar cache-interval
122Caching interval.
123.Nm
124will cache the validity of home directories for this interval, in
125seconds. Entries which have been verified within the last
126.Ar cache-interval
127seconds will not be verified again, since the operation could
128be expensive, and the entries are most likely still valid.
129After the interval has expired,
130.Nm
131will re-verify the validity of the user's home directory, and
132reset the cache time-counter. The default value for
133.Ar cache-interval
134is 300 seconds
135(5 minutes).
136.It Fl f
137Force fast startup. This option tells
138.Nm
139to skip startup-time consistency checks such as existence of mount
140directory, alternate spool directory, symlink to be hidden under the
141mount directory, their permissions and validity.
142.It Fl g Ar group
143Set the special group
144.Va HLFS_GID
145to
146.Ar group .
147Programs such as
148.Ic comsat ,
149(which access the mailboxes of other users)
150must be setgid
151.Va HLFS_GID
152to work properly. The default group is
153.Dq hlfs .
154If no group is provided, and there is no group
155.Dq hlfs ,
156this feature is disabled.
157.It Fl h
158Help. Print a brief help message, and exit.
159.It Fl i Ar reload-interval
160Map-reloading interval. Each
161.Ar reload-interval
162seconds,
163.Nm
164will reload the password map.
165.Nm
166needs the password map for the UIDs and home directory pathnames.
167.Nm
168schedules a
169.Va SIGALRM
170to reload the password maps. A
171.Va SIGHUP
172sent to
173.Nm
174will force it to reload the maps immediately. The default value for
175.Ar reload-interval
176is 900 seconds
177(15 minutes).
178.It Fl l Ar logfile
179Specify a log file to which
180.Nm
181will record events. If
182.Pa logfile
183is the string
184.Pa syslog
185then the log messages will be sent to the system log daemon by
186.Xr syslog 3 ,
187using the
188.Va LOG_DAEMON
189facility. This is also the default.
190.It Fl n
191No verify.
192.Nm
193will not verify the validity of the symbolic link it will be
194returning, or that the user's home directory contains
195sufficient disk-space for spooling. This can speed up
196.Nm
197at the cost of possibly returning symbolic links to home
198directories which are not currently accessible or are full.
199By default,
200.Nm
201validates the symbolic-link in the background.
202The
203.Fl n
204option overrides the meaning of the
205.Fl c
206option, since no caching is necessary.
207.It Fl o Ar mount-options
208Mount options. Mount options which
209.Nm
210will use to mount itself on top of
211.Pa dirname .
212By default,
213.Ar mount-options
214is set to
215.Qq ro .
216If the system supports symbolic-link caching, default
217options are set to
218.Qq ro,nocache .
219.It Fl p
220Prints
221.Va PID .
222Outputs the process-id of
223.Nm
224to standard output where it can be saved into a file.
225.It Fl v
226Version. Displays version information to standard error.
227.It Fl x Ar log-options
228Specify run-time logging options. The options are a comma separated
229list chosen from: fatal, error, user, warn, info, map, stats, all.
230.It Fl C
231Force
232.Nm
233to run on systems that cannot turn off the NFS attribute-cache. Use of
234this option on those systems is discouraged, as it may result in loss
235or misdelivery of mail. The option is ignored on systems that can turn
236off the attribute-cache.
237.It Fl D Ar log-options
238Select from a variety of debugging options. Prefixing an
239option with the string
240.Qq no
241reverses the effect of that option. Options are cumulative.
242The most useful option is
243.Em all .
244Since this option is only used for debugging other options are not
245documented here. A fuller description is available in the program
246source. A
247.Va SIGUSR1
248sent to
249.Nm
250will cause it to dump its internal password map to the file
251.Pa /usr/tmp/hlfsd.dump.XXXXXX .
252.It Fl P Ar password-file
253Read the user-name, user-id, and home directory information from the file
254.Ar password-file .
255Normally,
256.Nm
257will use
258.Xr getpwent 3
259to read the password database. This option allows you to override the
260default database, and is useful if you want to map users' mail files to a
261directory other than their home directory. Only the username, uid, and
262home-directory fields of the file
263.Ar password-file
264are read and checked. All other fields are ignored. The file
265.Ar password-file
266must be compliant with
267.Ux
268System 7 colon-delimited format
269.Xr passwd 5 .
270.El
271.Sh FILES
272.Bl -tag -width /axx
273.It Pa /hlfs
274directory under which
275.Nm
276mounts itself and manages the symbolic link
277.Pa home .
278.It Pa .hlfsdir
279default sub-directory in the user's home directory, to which the
280.Pa home
281symbolic link returned by
282.Nm
283points.
284.It Pa /var/hlfs
285directory to which
286.Pa home
287symbolic link returned by
288.Nm
289points if it is unable to verify the that
290user's home directory is accessible.
291.El
292.Sh SEE ALSO
293.Xr mail 1 ,
294.Xr getgrent 3 ,
295.Xr getpwent 3 ,
296.Xr mtab 5 ,
297.Xr passwd 5 ,
298.Xr amd 8 ,
299.Xr cron 8 ,
300.Xr mount 8 ,
301.Xr sendmail 8 ,
302.Xr umount 8
303.Rs
304.%T HLFSD: Delivering Email to Your $HOME
305.%B Proc. LISA-VII, The 7th Usenix System Administration Conference
306.%D November 1993
307.Re
308.Sh AUTHORS
309.An Erez Zadok Aq ezk@cs.columbia.edu ,
310Department of Computer Science, Columbia University,
311New York, USA.
312.Pp
313.An Alexander Dupuy Aq dupuy@smarts.com ,
314System Management ARTS, White Plains, New York, USA.
315.Sh HISTORY
316The
317.Nm
318utility appeared in
319.Fx 3.0 .