Commit 95dfc8bd by Serge Hallyn

lxc_user_nic: don't pass unused arg to get_username()

parent 8d9f636d
...@@ -122,7 +122,7 @@ int open_and_lock(char *path) ...@@ -122,7 +122,7 @@ int open_and_lock(char *path)
} }
char *get_username(char **buf) char *get_username(void)
{ {
struct passwd *pwd = getpwuid(getuid()); struct passwd *pwd = getpwuid(getuid());
...@@ -901,13 +901,13 @@ int main(int argc, char *argv[]) ...@@ -901,13 +901,13 @@ int main(int argc, char *argv[])
{ {
int n, fd; int n, fd;
bool gotone = false; bool gotone = false;
char *me, *buf = alloca(400); char *me;
char *nicname = alloca(40); char *nicname = alloca(40);
char *cnic; // created nic name in container is returned here. char *cnic; // created nic name in container is returned here.
char *vethname; char *vethname;
int pid; int pid;
if ((me = get_username(&buf)) == NULL) { if ((me = get_username()) == NULL) {
fprintf(stderr, "Failed to get username\n"); fprintf(stderr, "Failed to get username\n");
exit(1); exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment