[lxc/lxc] 128655: lxc_setup_ttys: Handle existing ttyN file without ...

1 view
Skip to first unread message

Christian Brauner

unread,
Jul 22, 2021, 3:24:30 AM (2 days ago) Jul 22
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 128655e7654cc95f658d905927a97cf065136782
https://github.com/lxc/lxc/commit/128655e7654cc95f658d905927a97cf065136782
Author: Petr Malat <o...@malat.biz>
Date: 2021-07-20 (Tue, 20 Jul 2021)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
lxc_setup_ttys: Handle existing ttyN file without underlying device

If a device file is opened and there isn't the underlying device,
the open call fails with ENXIO, but the path can be opened with
O_PATH, which is enough for mounting over the device file.

Generalize this idea and use O_PATH for all cases when the file
is there. One still must check for both ENXIO and EEXIST as it's
unspecified what error is reported if multiple error conditions
occur at the same time.

Signed-off-by: Petr Malat <o...@malat.biz>


Commit: f10866f0d58aeefe6db84f2c3ff85580d68cbae3
https://github.com/lxc/lxc/commit/f10866f0d58aeefe6db84f2c3ff85580d68cbae3
Author: Christian Brauner <christia...@ubuntu.com>
Date: 2021-07-22 (Thu, 22 Jul 2021)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
Merge pull request #3910 from petris/tty_enxio

lxc_setup_ttys: Handle existing ttyN file without underlying device


Compare: https://github.com/lxc/lxc/compare/b9327b7f9245...f10866f0d58a
Reply all
Reply to author
Forward
0 new messages