Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
}
-char *get_username(char **buf)
+char *get_username(void)
{
struct passwd *pwd = getpwuid(getuid());
{
int n, fd;
bool gotone = false;
- char *me, *buf = alloca(400);
+ char *me;
char *nicname = alloca(40);
char *cnic; // created nic name in container is returned here.
char *vethname;
int pid;
- if ((me = get_username(&buf)) == NULL) {
+ if ((me = get_username()) == NULL) {
fprintf(stderr, "Failed to get username\n");
exit(1);
}