1 /* PIPServer - A deamon for finger protocol v2 2 * 3 * Copyright (C) 1999 Michael Baumer 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the 17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 * Boston, MA 02111-1307, USA. 19 */ 20 21 #ifndef FINGER_H 22 #define FINGER_H 23 24 #include <sys/types.h> 25 26 #include "utmplib.h" 27 #ifndef UT_NAMESIZE 28 #define UT_NAMESIZE 16 29 #endif 30 31 /* This structure contains information about the user 32 * 33 * It is defined so, that if no user information is available, 34 * it can be emulated by reading the passwd file (Read: we have a 35 * field "realname") 36 */ 37 38 typedef struct finger_userinfo { 39 char *pw_name; 40 char *pw_realname; 41 char *office; 42 char *office_phone; 43 char *home_phone; 44 char *homedir; /* this will not be printed, but is used to find the users 45 * configuration files */ 46 } finger_userinfo; 47 48 49 /* This structure contains information about who is logged in 50 * 51 * It contains no data that would have to be looked up in the users 52 * configuration 53 */ 54 55 #define HOSTNAME_LEN 64 56 #define REALNAME_LEN 64 57 #define STATUS_LEN 16 58 59 typedef struct login_info { 60 time_t login_time; 61 char login_user[UT_NAMESIZE]; 62 char realname[REALNAME_LEN]; 63 char hostname[HOSTNAME_LEN]; 64 char fromhost[HOSTNAME_LEN]; 65 time_t idle_time; 66 char status[STATUS_LEN]; 67 struct login_info *next; 68 } login_info; 69 70 typedef struct field_perm { 71 int tty; 72 int login; 73 int idle; 74 int mail; 75 } field_perm; 76 77 struct aclT; /* defined in acl.h */ 78 79 typedef struct fingerconf { 80 unsigned int first_uid; /* first uid to finger */ 81 int gnufinger; /* are we in gnufinger mode */ 82 int interval; /* interval for site server */ 83 #if 0 84 int userlist; /* show userlist (`finger @host`) */ 85 int showidle; /* Show idle time */ 86 int showfrom; /* Show from host */ 87 int hidemail; /* Hide mail status */ 88 int hideall; /* Disable "all" requests */ 89 #endif 90 int clusterType; /* 0: not on a cluster, 1: client, 2: master */ 91 char *siteinfo; 92 char *help; 93 char *validfile[11]; 94 char *filedesc[10]; 95 char *userfilepath[4]; 96 char *dbpath; 97 char *gnufingerdir; 98 char *sitehost; 99 int numclients; 100 char **clients; 101 struct aclT *acl; /* Access Control List */ 102 struct aclT *allow; 103 struct aclT *deny; 104 int aclorder; /* 0 = deny,allow ; 1 = allow,deny */ 105 } fingerconf; 106 107 extern fingerconf config; 108 109 #endif /* FINGER_H */ 110