summaryrefslogtreecommitdiffstats
path: root/libutil/login_cap.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2008-11-04 13:49:18 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2008-11-04 13:49:18 +0000
commit4062b3a16ba593649962f2674319d1ee8f980a68 (patch)
treed3a5ac07438c072ca4eb46b789470783f2adc57d /libutil/login_cap.c
parent71bd4057e8093e3a7c26bb475cbc790978c3b984 (diff)
downloadpw-darwin-4062b3a16ba593649962f2674319d1ee8f980a68.tar.gz
pw-darwin-4062b3a16ba593649962f2674319d1ee8f980a68.tar.zst
pw-darwin-4062b3a16ba593649962f2674319d1ee8f980a68.zip
Committed to wrong branch.
Diffstat (limited to 'libutil/login_cap.c')
-rw-r--r--libutil/login_cap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libutil/login_cap.c b/libutil/login_cap.c
index 8fee760..529ce82 100644
--- a/libutil/login_cap.c
+++ b/libutil/login_cap.c
@@ -61,8 +61,6 @@ static char * internal_string = NULL;
static size_t internal_arraysz = 0;
static const char ** internal_array = NULL;
-static char path_login_conf[] = _PATH_LOGIN_CONF;
-
static char *
allocstr(const char *str)
{
@@ -217,14 +215,15 @@ login_getclassbyname(char const *name, const struct passwd *pwd)
if (dir && snprintf(userpath, MAXPATHLEN, "%s/%s", dir,
_FILE_LOGIN_CONF) < MAXPATHLEN) {
+ login_dbarray[i] = userpath;
if (_secure_path(userpath, pwd->pw_uid, pwd->pw_gid) != -1)
- login_dbarray[i++] = userpath;
+ i++; /* only use 'secure' data */
}
/*
* XXX: Why to add the system database if the class is `me'?
*/
- if (_secure_path(path_login_conf, 0, 0) != -1)
- login_dbarray[i++] = path_login_conf;
+ if (_secure_path(_PATH_LOGIN_CONF, 0, 0) != -1)
+ login_dbarray[i++] = _PATH_LOGIN_CONF;
login_dbarray[i] = NULL;
memset(lc, 0, sizeof(login_cap_t));