projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
major bugfix for sigset_t (it was mistakenly 1024 bytes instead of bits)
[musl]
/
src
/
misc
/
cuserid.c
1
#include <pwd.h>
2
#include <stdio.h>
3
#include <unistd.h>
4
5
char *cuserid(char *buf)
6
{
7
struct passwd pw, *ppw;
8
long pwb[256];
9
if (getpwuid_r(geteuid(), &pw, (void *)pwb, sizeof pwb, &ppw))
10
return 0;
11
snprintf(buf, L_cuserid, "%s", pw.pw_name);
12
return buf;
13
}