in template_fixup we only call this method for version < 7, but greater
versions also need to allow lxc/tty[N] as secure.

Signed-off-by: Oguz Bektas <o.bek...@proxmox.com>
---

v1->v2:
* call setup_securetty unconditionally

 src/PVE/LXC/Setup/CentOS.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm
index 1e6894b..3721ca7 100644
--- a/src/PVE/LXC/Setup/CentOS.pm
+++ b/src/PVE/LXC/Setup/CentOS.pm
@@ -109,10 +109,9 @@ sub template_fixup {
        my $data = $self->ct_file_get_contents($filename);
        $data =~ s!^(/sbin/start_udev.*)$!#$1!gm;
        $self->ct_file_set_contents($filename, $data);
-       
-       # edit /etc/securetty (enable login on console)
-       $self->setup_securetty($conf);
     }
+    # edit /etc/securetty (enable login on console)
+    $self->setup_securetty($conf);
 }
 
 sub setup_init {
-- 
2.20.1

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to