* Copyright (c) 1983 The Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1983 The Regents of the University of California.\n\
static char sccsid
[] = "@(#)fingerd.c 5.6 (Berkeley) %G%";
char **ap
, *av
[ENTRIES
+ 1], line
[1024], *strtok();
#ifdef LOGGING /* unused for now */
if (getpeername(0, &sin
, &sval
) < 0)
if (!fgets(line
, sizeof(line
), stdin
))
for (lp
= line
, ap
= &av
[1];;) {
*ap
= strtok(lp
, " \t\r\n");
/* RFC742: "/[Ww]" == "-l" */
if ((*ap
)[0] == '/' && ((*ap
)[1] == 'W' || (*ap
)[1] == 'w'))
if (++ap
== av
+ ENTRIES
)
if (!(fp
= fdopen(p
[0], "r")))
while ((ch
= getc(fp
)) != EOF
) {
fprintf(stderr
, "fingerd: %s: %s\r\n", msg
, strerror(errno
));