use utmp path from utmp.h
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 06:35:57 +0000 (22:35 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 3 Apr 1989 06:35:57 +0000 (22:35 -0800)
SCCS-vsn: libexec/talkd/process.c 5.7

usr/src/libexec/talkd/process.c

index a325ebf..69616ba 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)process.c  5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)process.c  5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -167,8 +167,8 @@ find_user(name, tty)
        struct stat statb;
        char ftty[20];
 
        struct stat statb;
        char ftty[20];
 
-       if ((fd = fopen("/etc/utmp", "r")) == NULL) {
-               perror("Can't open /etc/utmp");
+       if ((fd = fopen(_PATH_UTMP, "r")) == NULL) {
+               fprintf(stderr, "talkd: can't read %s.\n", _PATH_UTMP);
                return (FAILED);
        }
 #define SCMPN(a, b)    strncmp(a, b, sizeof (a))
                return (FAILED);
        }
 #define SCMPN(a, b)    strncmp(a, b, sizeof (a))