]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/grupd.c
Rework the home directory creation and copy or the skel content to use *at
[pw-darwin.git] / pw / grupd.c
index 8735831595f0912ad75c270194adec2eaa35ebde..d52a345b48fb91142703a24a684e03c200154e46 100644 (file)
@@ -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) {