X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/d6d7189c26aa1c3f1bb8ac622e5daf43b8485c30..54a011838a76f1406af6edea1f1b2741105c5b80:/pw/pwupd.h diff --git a/pw/pwupd.h b/pw/pwupd.h index 054c5a5..daca487 100644 --- a/pw/pwupd.h +++ b/pw/pwupd.h @@ -38,12 +38,6 @@ #include #include -#if defined(__FreeBSD__) -#define RET_SETGRENT int -#else -#define RET_SETGRENT void -#endif - struct pwf { int _altdir; void (*_setpwent)(void); @@ -51,7 +45,7 @@ struct pwf { struct passwd * (*_getpwent)(void); struct passwd * (*_getpwuid)(uid_t uid); struct passwd * (*_getpwnam)(const char * nam); - RET_SETGRENT (*_setgrent)(void); + void (*_setgrent)(void); void (*_endgrent)(void); struct group * (*_getgrent)(void); struct group * (*_getgrgid)(gid_t gid); @@ -76,29 +70,16 @@ struct userconf { char *default_class; /* Default user class */ uid_t min_uid, max_uid; /* Allowed range of uids */ gid_t min_gid, max_gid; /* Allowed range of gids */ - int expire_days; /* Days to expiry */ - int password_days; /* Days to password expiry */ + time_t expire_days; /* Days to expiry */ + time_t password_days; /* Days to password expiry */ }; struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; - char *newname; - char *config; - char *gecos; int fd; int rootfd; - int which; - bool quiet; - bool force; - bool all; - bool dryrun; - bool pretty; - bool v7; bool checkduplicate; - bool deletehome; - bool precrypted; - struct userconf *userconf; }; extern struct pwf PWF; @@ -154,7 +135,7 @@ struct passwd * vgetpwnam(const char * nam); struct group * vgetgrent(void); struct group * vgetgrgid(gid_t gid); struct group * vgetgrnam(const char * nam); -RET_SETGRENT vsetgrent(void); +void vsetgrent(void); void vendgrent(void); void copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid,