diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-12 20:29:51 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-12 20:29:51 +0000 |
commit | 82e3411026949c74f9a726bb418b3fdcbc4e9fd0 (patch) | |
tree | 220b3c93097f3a69a4282486b48c4b4ae65d1110 /pw/pwupd.h | |
parent | 36810b94302ed35424caa32ae205ee0f1d4f7185 (diff) | |
download | pw-darwin-82e3411026949c74f9a726bb418b3fdcbc4e9fd0.tar.gz pw-darwin-82e3411026949c74f9a726bb418b3fdcbc4e9fd0.tar.zst pw-darwin-82e3411026949c74f9a726bb418b3fdcbc4e9fd0.zip |
Rework the home directory creation and copy or the skel content to use *at
functions
This allows to simplify the code a bit for -R by not having to keep modifying
path and also prepare the code to improve support -R in userdel
While here, add regression tests for the functionality
Diffstat (limited to 'pw/pwupd.h')
-rw-r--r-- | pw/pwupd.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -87,6 +87,7 @@ struct pwconf { char *config; char *gecos; int fd; + int rootfd; int which; bool quiet; bool force; @@ -156,7 +157,8 @@ struct group * vgetgrnam(const char * nam); RET_SETGRENT vsetgrent(void); void vendgrent(void); -void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid); +void copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid, + gid_t gid, int flags); void rm_r(char const * dir, uid_t uid); __END_DECLS |