diff options
author | yar <yar@FreeBSD.org> | 2001-07-30 16:50:47 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2001-07-30 16:50:47 +0000 |
commit | d4e647fdae9dd7581118f63c835cd7b6ff9ff7f8 (patch) | |
tree | a81a739443f073e8c3e3af780465eeec951f109c /usr.bin/finger | |
parent | 8f93713df5e70a630cf91db6f141a03b29821c5d (diff) | |
download | FreeBSD-src-d4e647fdae9dd7581118f63c835cd7b6ff9ff7f8.zip FreeBSD-src-d4e647fdae9dd7581118f63c835cd7b6ff9ff7f8.tar.gz |
Don't use ".nofinger" as a string constant from within the code
since there is the ``pathnames.h'' file; use _PATH_NOFINGER instead.
Diffstat (limited to 'usr.bin/finger')
-rw-r--r-- | usr.bin/finger/pathnames.h | 1 | ||||
-rw-r--r-- | usr.bin/finger/util.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/finger/pathnames.h b/usr.bin/finger/pathnames.h index 1da786e..7c9ad19 100644 --- a/usr.bin/finger/pathnames.h +++ b/usr.bin/finger/pathnames.h @@ -29,6 +29,7 @@ #ifndef PATHNAMES_H #define _PATH_FORWARD ".forward" +#define _PATH_NOFINGER ".nofinger" #define _PATH_PLAN ".plan" #define _PATH_PROJECT ".project" #define _PATH_PUBKEY ".pubkey" diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 2efa310..93b4889 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -57,6 +57,7 @@ static const char rcsid[] = #include <unistd.h> #include <utmp.h> #include "finger.h" +#include "pathnames.h" static void find_idle_and_ttywrite __P((WHERE *)); static void userinfo __P((PERSON *, struct passwd *)); @@ -416,7 +417,7 @@ hide(pw) if (!pw->pw_dir) return 0; - snprintf(buf, sizeof(buf), "%s/.nofinger", pw->pw_dir); + snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, _PATH_NOFINGER); if (access(buf, F_OK) == 0) return 1; |