1*8a16b7a1SPedro F. Giffuni /*- 2*8a16b7a1SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 3*8a16b7a1SPedro F. Giffuni * 49b50d902SRodney W. Grimes * Copyright (c) 1989, 1993 59b50d902SRodney W. Grimes * The Regents of the University of California. All rights reserved. 69b50d902SRodney W. Grimes * 79b50d902SRodney W. Grimes * This code is derived from software contributed to Berkeley by 89b50d902SRodney W. Grimes * Tony Nardo of the Johns Hopkins University/Applied Physics Lab. 99b50d902SRodney W. Grimes * 109b50d902SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 119b50d902SRodney W. Grimes * modification, are permitted provided that the following conditions 129b50d902SRodney W. Grimes * are met: 139b50d902SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 149b50d902SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 159b50d902SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 169b50d902SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 179b50d902SRodney W. Grimes * documentation and/or other materials provided with the distribution. 18fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 199b50d902SRodney W. Grimes * may be used to endorse or promote products derived from this software 209b50d902SRodney W. Grimes * without specific prior written permission. 219b50d902SRodney W. Grimes * 229b50d902SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 239b50d902SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 249b50d902SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 259b50d902SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 269b50d902SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 279b50d902SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 289b50d902SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 299b50d902SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 309b50d902SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 319b50d902SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 329b50d902SRodney W. Grimes * SUCH DAMAGE. 339b50d902SRodney W. Grimes */ 349b50d902SRodney W. Grimes 358714ee59SJuli Mallett #ifndef _FINGER_H_ 368714ee59SJuli Mallett #define _FINGER_H_ 378714ee59SJuli Mallett 389b50d902SRodney W. Grimes typedef struct person { 399b50d902SRodney W. Grimes uid_t uid; /* user id */ 409b50d902SRodney W. Grimes char *dir; /* user's home directory */ 419b50d902SRodney W. Grimes char *homephone; /* pointer to home phone no. */ 429b50d902SRodney W. Grimes char *name; /* login name */ 439b50d902SRodney W. Grimes char *office; /* pointer to office name */ 449b50d902SRodney W. Grimes char *officephone; /* pointer to office phone no. */ 459b50d902SRodney W. Grimes char *realname; /* pointer to full name */ 469b50d902SRodney W. Grimes char *shell; /* user's shell */ 4786641d8fSPaul Traina time_t mailread; /* last time mail was read */ 4886641d8fSPaul Traina time_t mailrecv; /* last time mail was received */ 499b50d902SRodney W. Grimes struct where *whead, *wtail; /* list of where user is or has been */ 509b50d902SRodney W. Grimes } PERSON; 519b50d902SRodney W. Grimes 529b50d902SRodney W. Grimes enum status { LASTLOG, LOGGEDIN }; 539b50d902SRodney W. Grimes 549b50d902SRodney W. Grimes typedef struct where { 559b50d902SRodney W. Grimes struct where *next; /* next place user is or has been */ 569b50d902SRodney W. Grimes enum status info; /* type/status of request */ 579b50d902SRodney W. Grimes short writable; /* tty is writable */ 589b50d902SRodney W. Grimes time_t loginat; /* time of (last) login */ 599b50d902SRodney W. Grimes time_t idletime; /* how long idle (if logged in) */ 6070ad88f3SEd Schouten char tty[sizeof ((struct utmpx *)0)->ut_line]; /* tty line */ 6170ad88f3SEd Schouten char host[sizeof ((struct utmpx *)0)->ut_host]; /* host name */ 629b50d902SRodney W. Grimes } WHERE; 639b50d902SRodney W. Grimes 64dd5288f3SDavid E. O'Brien #define UNPRIV_NAME "nobody" /* Preferred privilege level */ 65dd5288f3SDavid E. O'Brien #define UNPRIV_UGID 32767 /* Default uid and gid */ 66dd5288f3SDavid E. O'Brien #define OUTPUT_MAX 100000 /* Do not keep listinging forever */ 67dd5288f3SDavid E. O'Brien #define TIME_LIMIT 360 /* Do not keep listinging forever */ 68dd5288f3SDavid E. O'Brien 699b50d902SRodney W. Grimes #include "extern.h" 708714ee59SJuli Mallett 718714ee59SJuli Mallett #endif /* !_FINGER_H_ */ 72