]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_user_nic: continue when we failed to find a group
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 7 Apr 2020 19:28:32 +0000 (21:28 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 8 Apr 2020 07:18:45 +0000 (09:18 +0200)
Closes #3361.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cmd/lxc_user_nic.c

index 64fbca3e748d2db48f0bc2ed232b3b1ef2300966..edb2d8f03fb80d164672716470e8da9f9c488c69 100644 (file)
@@ -200,13 +200,10 @@ static char **get_groupnames(void)
                        }
                        buf = new_buf;
                }
-               if (!grentp) {
-                       if (ret == 0)
-                               usernic_error("%s", "Could not find matched group record\n");
 
-                       CMD_SYSERROR("Failed to get group name: %u\n", group_ids[i]);
-                       return NULL;
-               }
+               /* If a group is not found, just ignore it. */
+               if (!grentp)
+                       continue;
 
                groupnames[i] = strdup(grent.gr_name);
                if (!groupnames[i]) {