summaryrefslogtreecommitdiff
path: root/src/libc/pwd.c
blob: d7bf2af156e93fe121c381d9d3d619ca1f4e6b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <grp.h>
#include <pwd.h>
#include <string.h>

struct passwd *
getpwuid(uid_t uid)
{
	static struct passwd p;
	memset(&p, 0, sizeof p);
	p.pw_name = "unnamed";
	p.pw_uid = uid;
	return &p;
}

struct group *
getgrgid(gid_t gid)
{
	static struct group g;
	memset(&g, 0, sizeof g);
	g.gr_name = "unnamed";
	g.gr_gid = gid;
	return &g;
}