]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
terminal: fail on unknown error during TIOCGPTPEER 3919/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 31 Jul 2021 08:19:57 +0000 (10:19 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 31 Jul 2021 08:19:57 +0000 (10:19 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/terminal.c

index dcdb51df5f51c769a0194264c5cfcf619bb9c6a9..cdb44956c539b10cca4a20e6341e49da8bd9165c 100644 (file)
@@ -944,9 +944,10 @@ int lxc_devpts_terminal(int devpts_fd, int *ret_ptx, int *ret_pty,
                        break;
                default:
                        SYSWARN("Failed to allocate new pty device");
-                       break;
+                       return -errno;
                }
 
+               /* The caller tells us that they trust the devpts instance. */
                if (require_tiocgptpeer)
                        return ret_errno(ENODEV);
        }