1 .\" $NetBSD: ttyaction.3,v 1.13 2008/04/30 13:10:52 martin Exp $
3 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd ttyaction utility function
41 .Fn ttyaction "char *ttyname" "char *action" "char *username"
51 to execute site-specific commands
52 when a login session begins and ends.
58 file for any records that match the current
62 parameters, and for each matching record,
63 runs the shell command shown in that record.
64 The record format is described in
68 is the name of the new owner of the
73 parameter may be passed as a fully qualified pathname, and the
75 function will skip the leading "/dev/" part of the string.
76 (This is a convenience for login and getty.)
79 returns the status of the last command it executed,
80 or zero if no matching commands were found.
82 .Bl -tag -width /etc/ttyaction -compact
91 .An Chris G. Demetriou
94 .Aq tsarna@NetBSD.org .
98 mechanism to allow selection of different access control policies
100 It has been suggested that the same
102 mechanism should also be used for determining access control, but
103 it was decided (after much discussion) that
105 should only describe actions to be performed
107 the system has decided to change the ownership of some tty.
108 Access control policies will be handled by a separate mechanism.