1 /* 2 * Copyright (c) 1989 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)ttyent.h 5.4 (Berkeley) 05/29/90 18 */ 19 20 #define _PATH_TTYS "/etc/ttys" 21 22 #define _TTYS_OFF "off" 23 #define _TTYS_ON "on" 24 #define _TTYS_SECURE "secure" 25 #define _TTYS_WINDOW "window" 26 27 struct ttyent { 28 char *ty_name; /* terminal device name */ 29 char *ty_getty; /* command to execute, usually getty */ 30 char *ty_type; /* terminal type for termcap */ 31 #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ 32 #define TTY_SECURE 0x02 /* allow uid of 0 to login */ 33 int ty_status; /* status flags */ 34 char *ty_window; /* command to start up window manager */ 35 char *ty_comment; /* comment field */ 36 }; 37 38 #if __STDC__ || c_plusplus 39 extern struct ttyent *getttyent(void); 40 extern struct ttyent *getttynam(const char *); 41 extern int setttyent(void); 42 extern int endttyent(void); 43 #else 44 extern struct ttyent *getttyent(); 45 extern struct ttyent *getttynam(); 46 extern int setttyent(); 47 extern int endttyent(); 48 #endif 49