Add a securetty file

Do not copy host securetty file - this one should be comprehensive
or bind mount host one in yourself.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-07-14 18:31:44 +01:00
parent ecaa7f9c68
commit 98ed378dbd
2 changed files with 33 additions and 7 deletions

33
pkg/getty/etc/securetty Normal file
View File

@ -0,0 +1,33 @@
console
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
# UART serial ports
ttyS0
ttyS1
ttyS2
ttyS3
# IBM iSeries/pSeries virtual console, Xen
hvc0
hvc1
#IBM pSeries console ports
hvsi0
hvsi1
# ARM "AMBA" serial ports
ttyAM0
ttyAM1
# s390 and s390x ports in LPAR mode
ttysclp0

View File

@ -49,13 +49,6 @@ if [ -f $ROOTSHADOW ]; then
echo >> /etc/shadow
fi
ROOTSTTY=/hostroot/etc/securetty
if [ -f $ROOTSTTY ]; then
cp $ROOTSTTY /etc/securetty
# just in case someone forgot a newline
echo >> /etc/securetty
fi
for opt in $(cat /proc/cmdline); do
case "$opt" in
console=*)