Skip to content
Snippets Groups Projects
Commit 93c55b7d authored by Avi Kivity's avatar Avi Kivity
Browse files

libc: implement uname()

Pretend we're another OS to avoid confusing the payload.
parent 691d8284
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
#include <limits>
#include <sys/resource.h>
#include <pwd.h>
#include <sys/utsname.h>
int libc_error(int err)
{
......@@ -179,3 +180,14 @@ int getpwuid_r(uid_t uid, struct passwd *pwd,
*result = pwd;
return 0;
}
int uname(struct utsname* u)
{
// lie, to avoid confusing the payload.
strcpy(u->sysname, "Linux");
strcpy(u->nodename, "home");
strcpy(u->release, "3.7");
strcpy(u->version, "#1 SMP");
strcpy(u->machine, "x86_64");
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment