summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/grupd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pw/grupd.c')
-rw-r--r--usr.sbin/pw/grupd.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/usr.sbin/pw/grupd.c b/usr.sbin/pw/grupd.c
index 8735831..d52a345 100644
--- a/usr.sbin/pw/grupd.c
+++ b/usr.sbin/pw/grupd.c
@@ -39,28 +39,14 @@ static const char rcsid[] =
#include "pwupd.h"
-static char * grpath = _PATH_PWD;
-
-int
-setgrdir(const char * dir)
-{
- if (dir == NULL)
- return -1;
- else
- grpath = strdup(dir);
- if (grpath == NULL)
- return -1;
-
- return 0;
-}
-
char *
getgrpath(const char * file)
{
static char pathbuf[MAXPATHLEN];
- snprintf(pathbuf, sizeof pathbuf, "%s/%s", grpath, file);
- return pathbuf;
+ snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file);
+
+ return (pathbuf);
}
static int
@@ -76,7 +62,7 @@ gr_update(struct group * grp, char const * group)
if (group != NULL)
old_gr = GETGRNAM(group);
- if (gr_init(grpath, NULL))
+ if (gr_init(conf.etcpath, NULL))
err(1, "gr_init()");
if ((pfd = gr_lock()) == -1) {
OpenPOWER on IntegriCloud