10 lines
160 B
C
10 lines
160 B
C
|
#include <pwd.h>
|
||
|
#include <stdio.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
char *get_user() {
|
||
|
struct passwd *pass;
|
||
|
pass = getpwuid(getuid());
|
||
|
return pass->pw_name;
|
||
|
}
|