32 lines
831 B
C
32 lines
831 B
C
/*
|
|
* <pwd.h> for the MontaukOS git port.
|
|
*
|
|
* MontaukOS has users (0:/users/<name>, see montauk/user.h) but no
|
|
* /etc/passwd database and no numeric uid model -- everything runs as the
|
|
* session user. getpwuid()/getpwnam() therefore answer from the current
|
|
* session rather than from a database, which is exactly what git wants them
|
|
* for: the fallback identity in ident.c ("You gotta tell me who you are") and
|
|
* the home directory behind "~".
|
|
*
|
|
* Implementation in montauk-compat.c.
|
|
*/
|
|
#ifndef _MONTAUK_GIT_PWD_H_
|
|
#define _MONTAUK_GIT_PWD_H_
|
|
|
|
#include <sys/types.h>
|
|
|
|
struct passwd {
|
|
char *pw_name;
|
|
char *pw_passwd;
|
|
uid_t pw_uid;
|
|
gid_t pw_gid;
|
|
char *pw_gecos;
|
|
char *pw_dir;
|
|
char *pw_shell;
|
|
};
|
|
|
|
struct passwd *getpwuid(uid_t uid);
|
|
struct passwd *getpwnam(const char *name);
|
|
|
|
#endif /* _MONTAUK_GIT_PWD_H_ */
|