initial import

This commit is contained in:
garbeam@wmii.de
2005-11-20 18:27:27 +02:00
commit e5f0f74b8a
323 changed files with 41871 additions and 0 deletions

16
lib9/getuser.c Normal file
View File

@@ -0,0 +1,16 @@
#include <u.h>
#include <pwd.h>
#include <libc.h>
char*
getuser(void)
{
static char user[64];
struct passwd *pw;
pw = getpwuid(getuid());
if(pw == nil)
return "none";
strecpy(user, user+sizeof user, pw->pw_name);
return user;
}