Import /etc/shadow support from Musl for Linux

Fixes #992
This commit is contained in:
Justine Tunney 2023-12-07 16:26:04 -08:00
parent 06ace4e7b4
commit f8ea02d4d1
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 224 additions and 7 deletions

15
third_party/musl/pwf.internal.h vendored Normal file
View file

@ -0,0 +1,15 @@
#include <pwd.h>
#include <grp.h>
#include <shadow.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
int __getpwent_a(FILE *f, struct passwd *pw, char **line, size_t *size, struct passwd **res);
int __getpw_a(const char *name, uid_t uid, struct passwd *pw, char **buf, size_t *size, struct passwd **res);
int __getgrent_a(FILE *f, struct group *gr, char **line, size_t *size, char ***mem, size_t *nmem, struct group **res);
int __getgr_a(const char *name, gid_t gid, struct group *gr, char **buf, size_t *size, char ***mem, size_t *nmem, struct group **res);
int __parsespent(char *s, struct spwd *sp);