]> git.proxmox.com Git - mirror_lxc.git/commit - templates/lxc-centos.in
Modify lxc-fedora and lxc-centos for multiple issues...
authorMichael H. Warfield <mhw@WittsEnd.com>
Mon, 13 Jan 2014 01:53:49 +0000 (20:53 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 14 Jan 2014 22:01:28 +0000 (17:01 -0500)
commitb4f7af7a520b23c873e404562ec518a576e63d4c
tree648b495596e7d45e2c156082e9325189c17b9338
parentd16079b6cb98290f474851611c9f6d264e9b30e7
Modify lxc-fedora and lxc-centos for multiple issues...

This is a reissue of two previous patches along with some additional
changes for hardening the root password process based on discussions
on-list.

--
This patch modifies the lxc-fedora and lxc-centos templates for 3 things.

1) Extensively modifies root password generation, storage, and management
    based on discussions on the devel list.

  Root passwords are hardened and have advanced configurability.
    A static password may be provided.
    A password based on a template may be generated, including ${RANDOM}.
    A password may be generated through mktmp using a template with X's.
    Root passwords default to expired, initially.
    Passwords may optionally be echoed to stdout at container creation. (no)
    Passwords may optionally be stored in ${rootfs_path}/tmp_root_pass. (yes)
    Users may be optionally forced to change the password at creation time. (no)
    Default is to generate a pattern based password and store, no force change.
    All of this may be overridden by environment variables through
      conditional assignment.

2) Random static hardware addresses are generated for all configured
    interfaces.

3) Add code to create sysv init style scripts to intercept shutdown and
    reboot to prevent init restart and hang for CentOS and legacy Fedora
    systems on shutdown, reboot, init 0, and init 6.  This solves a variety
    of hang conditions but only affects newly created containers.  Does
    not have any impact on systemd based containers.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-centos.in
templates/lxc-fedora.in