Subject: bin/36278: paths in finger
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 05/05/2007 16:50:01
>Number: 36278
>Category: bin
>Synopsis: paths in finger
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat May 05 16:50:01 +0000 2007
>Originator: David A. Holland <dholland@eecs.harvard.edu>
>Release: NetBSD 4.99.19 (20070505)
>Organization:
>Environment:
System: NetBSD tanaqui 4.99.19 NetBSD 4.99.19 (TANAQUI) #11: Thu May 3 09:10:23 EDT 2007 root@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:
finger doesn't conform to the standards for compiling in paths, and
unnecessarily so.
>How-To-Repeat:
-
>Fix:
Index: finger.h
===================================================================
RCS file: /cvsroot/src/usr.bin/finger/finger.h,v
retrieving revision 1.9
diff -u -r1.9 finger.h
--- finger.h 7 Aug 2003 11:13:45 -0000 1.9
+++ finger.h 5 May 2007 16:44:55 -0000
@@ -34,7 +34,6 @@
* from: @(#)finger.h 8.1 (Berkeley) 6/6/93
*/
-#define _PATH_MAILSPOOL "/var/mail"
/*
* All unique persons are linked in a list headed by "head" and linkd
Index: util.c
===================================================================
RCS file: /cvsroot/src/usr.bin/finger/util.c,v
retrieving revision 1.26
diff -u -r1.26 util.c
--- util.c 17 Mar 2006 04:53:55 -0000 1.26
+++ util.c 5 May 2007 16:44:55 -0000
@@ -393,7 +393,7 @@
strdup(p) : NULL;
pn->homephone = ((p = strsep(&bp, ",")) && *p) ?
strdup(p) : NULL;
- (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_MAILSPOOL,
+ (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_MAILDIR,
pw->pw_name);
pn->mailrecv = -1; /* -1 == not_valid */
if (stat(tbuf, &sb) < 0) {