blob: 5e825c128084040862aadfff43c871ccf9f692d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <pwd.h>
#include <stddef.h>
#include <limits.h>
struct passwd *getpwuid(uid_t uid)
{
static struct passwd pwd;
static char buf[LINE_MAX * 4];
struct passwd *res;
if (getpwuid_r(uid, &pwd, buf, sizeof(buf), &res) != 0)
return NULL;
return res;
}
|