2 * Copyright (c) 1989 - 1991, Julianne Frances Haugh
3 * Copyright (c) 1996 - 1997, Marek Michałkiewicz
4 * Copyright (c) 2005 , Tomasz Kłoczko
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the copyright holders or contributors may not be used to
16 * endorse or promote products derived from this software without
17 * specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 * port.h - structure of /etc/porttime
37 * Each entry in /etc/porttime consists of a TTY device
38 * name or "*" to indicate all TTY devices, followed by
39 * a list of 1 or more user IDs or "*" to indicate all
40 * user names, followed by a list of zero or more valid
41 * login times. Login time entries consist of zero or
42 * more day names (Su, Mo, Tu, We, Th, Fr, Sa, Wk, Al)
43 * followed by a pair of time values in HHMM format
48 * PORTS - Name of system port access time file.
49 * PORT_IDS - Allowable number of IDs per entry.
50 * PORT_TTY - Allowable number of TTYs per entry.
51 * PORT_TIMES - Allowable number of time entries per entry.
52 * PORT_DAY - Day of the week to a bit value (0 = Sunday).
55 #define PORTS "/etc/porttime"
59 #define PORT_DAY(day) (1<<(day))
62 * pt_names - pointer to array of device names in /dev/
63 * pt_users - pointer to array of applicable user IDs.
64 * pt_times - pointer to list of allowable time periods.
70 struct pt_time *pt_times;
74 * t_days - bit array for each day of the week (0 = Sunday)
75 * t_start - starting time for this entry
76 * t_end - ending time for this entry