lxc: Create /dev/tty automatically ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

(I posted this on libvirt-users but its more a development question)

src/lxc/lxc_container.c:lxcContainerPopulateDevices() has this table
of devices that are automatically created when an lxc container is
started.

    const struct {
        int maj;
        int min;
        mode_t mode;
        const char *path;
    } devs[] = {
        { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_NULL, 0666, "/dev/null" },
        { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_ZERO, 0666, "/dev/zero" },
        { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" },
        { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" },
        { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" },
    };

Can we add '/dev/tty' to this list ?

We were trying to run 'smbpasswd -a user' inside a container without
/dev/tty and the fopen("/dev/tty", "w+") in smbpasswd made /dev/tty
a regular file, breaking man(1), less(1), and ofcourse smbpasswd :-)

Sure we can add /dev/tty to container's rc.local or something, but
wouldn't it be in the same category as say, /dev/null or /dev/zero ?

Sukadev

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]