You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to security restrictions inside the container and well known for while. login from util-linux checks the output of ttyname(fd) and doesn't accept null value (which is valid value for tty inside the unprivileged tty container). As a result on any Linux distribution, which use login from util-linux following command fails: lxc exec <container_name> -- /bin/login -f <user_name>
with "FATAL: bad tty" inside container's log. However, debian and ubuntu are using login implementation from shadow project, which works fine for this case (login from shadow doesn't espect tty name is not null and simply assign it to UNKNOWN in this case).
The text was updated successfully, but these errors were encountered:
This comment actually describes how it happens that tty has NULL name. This problem looks complex, assosiated with 3 big projects at a time: util-linux, lxc and glibc and I am not sure where the proper fix should be (most likely, something need to be addressed in all of this projects). I entered the bug with the following reasoning:
lxc exec <container_name> -- /bin/login -f <user_name> fails for ArchLinux and Fedora but works for Debian and Ubuntu
Debian and Ubuntu work since they are using login from shadow project, when Arch and Fedora are using util-linux version
replacing login on Arch with version from shadow works
get_terminal_name from ttyutils.c currently reports name, path and number for tty inside lxc as null, null, null, most likely since it dereferences the symlink, which points to the tty not created in container's namespace, however tty itself is fully workable.
I have some time for hacking this or testing possible fixes, but I am asking for direction to look for possible fix.
This is related to security restrictions inside the container and well known for while. login from util-linux checks the output of
ttyname(fd)
and doesn't accept null value (which is valid value for tty inside the unprivileged tty container). As a result on any Linux distribution, which use login from util-linux following command fails:lxc exec <container_name> -- /bin/login -f <user_name>
with "FATAL: bad tty" inside container's log. However, debian and ubuntu are using login implementation from shadow project, which works fine for this case (login from shadow doesn't espect tty name is not null and simply assign it to
UNKNOWN
in this case).The text was updated successfully, but these errors were encountered: