diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-02 16:00:07 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-02 16:00:07 -0400 |
commit | f3dab068fce37270e5e4e1a00e5a44e30f00baf7 (patch) | |
tree | d6b8c70074d440e56c1d7cdbfc7b68d8b96bda96 /libutil/gr_util.c | |
parent | 6b46c62f4663c84790120a4e74e155a6ef16b41c (diff) | |
download | pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.tar.gz pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.tar.zst pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.zip |
Recommit everything, add chpass, improve history (except for a few files that git-filter-repo dislikes for some reason [_secure_path.c and login_cap.h])
Diffstat (limited to 'libutil/gr_util.c')
-rw-r--r-- | libutil/gr_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libutil/gr_util.c b/libutil/gr_util.c index bab4143..2561178 100644 --- a/libutil/gr_util.c +++ b/libutil/gr_util.c @@ -40,12 +40,17 @@ __FBSDID("$FreeBSD$"); #include <inttypes.h> #include <libutil.h> #include <paths.h> +#include <pwd.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <os/availability.h> +API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0)) +void * reallocarray(void * in_ptr, size_t nmemb, size_t size) __DARWIN_EXTSN(reallocarray) __result_use_check; + static int lockfd = -1; static char group_dir[PATH_MAX]; static char group_file[PATH_MAX]; @@ -62,7 +67,7 @@ gr_init(const char *dir, const char *group) { if (dir == NULL) { - strcpy(group_dir, _PATH_ETC); + strcpy(group_dir, _PATH_PWD); } else { if (strlen(dir) >= sizeof(group_dir)) { errno = ENAMETOOLONG; |