Don't use ".nofinger" as a string constant from within the code
since there is the ``pathnames.h'' file; use _PATH_NOFINGER instead.
This commit is contained in:
parent
4c9237c908
commit
b95dbabab3
@ -29,6 +29,7 @@
|
|||||||
#ifndef PATHNAMES_H
|
#ifndef PATHNAMES_H
|
||||||
|
|
||||||
#define _PATH_FORWARD ".forward"
|
#define _PATH_FORWARD ".forward"
|
||||||
|
#define _PATH_NOFINGER ".nofinger"
|
||||||
#define _PATH_PLAN ".plan"
|
#define _PATH_PLAN ".plan"
|
||||||
#define _PATH_PROJECT ".project"
|
#define _PATH_PROJECT ".project"
|
||||||
#define _PATH_PUBKEY ".pubkey"
|
#define _PATH_PUBKEY ".pubkey"
|
||||||
|
@ -57,6 +57,7 @@ static const char rcsid[] =
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
#include "finger.h"
|
#include "finger.h"
|
||||||
|
#include "pathnames.h"
|
||||||
|
|
||||||
static void find_idle_and_ttywrite __P((WHERE *));
|
static void find_idle_and_ttywrite __P((WHERE *));
|
||||||
static void userinfo __P((PERSON *, struct passwd *));
|
static void userinfo __P((PERSON *, struct passwd *));
|
||||||
@ -416,7 +417,7 @@ hide(pw)
|
|||||||
if (!pw->pw_dir)
|
if (!pw->pw_dir)
|
||||||
return 0;
|
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)
|
if (access(buf, F_OK) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user