]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: lxc.pts --> lxc.pty.max
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 2 Jul 2017 10:49:29 +0000 (12:49 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 2 Jul 2017 12:40:07 +0000 (14:40 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
13 files changed:
config/templates/common.conf.in
config/templates/openwrt.common.conf.in
config/templates/sabayon.common.conf.in
doc/lxc.container.conf.sgml.in
src/lxc/confile.c
src/tests/parse_config_file.c
templates/lxc-altlinux.in
templates/lxc-busybox.in
templates/lxc-cirros.in
templates/lxc-debian.in
templates/lxc-openmandriva.in
templates/lxc-pld.in
templates/lxc-sshd.in

index 27925221d261c888110678289c5d3741c07af996..e13d98a7fcc4833e9f834b2bed0205064f6d02dd 100644 (file)
@@ -4,7 +4,7 @@
 lxc.tty.dir = lxc
 
 # Allow for 1024 pseudo terminals
-lxc.pts = 1024
+lxc.pty.max = 1024
 
 # Setup 4 tty devices
 lxc.tty.max = 4
index 8877c498e55b2b8175b944c9e53a63a6504a643d..607bb5a3b01fb36e1d805f2d93aae9eeb1d938f0 100644 (file)
@@ -1,7 +1,7 @@
 # Default console settings
 lxc.tty.dir = lxc
 lxc.tty.max = 4
-lxc.pts = 1024
+lxc.pty.max = 1024
 
 # Default capabilities
 lxc.cap.drop = mac_admin
index 0251ab5c9b3aa21570ec6f94454b5097e17bddab..e14636635e9bedb93d4edc9d85052d9c5065614d 100644 (file)
@@ -4,7 +4,7 @@
 lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
 
 # Allow for 1024 pseudo terminals
-lxc.pts = 1024
+lxc.pty.max = 1024
 
 # Setup 1 tty devices for lxc-console command
 lxc.tty.max = 1
index 076efc455d0199658324e72b7dc2940a0d3f1488..f283649e65ae98c4384105e44398837a269808f4 100644 (file)
@@ -650,7 +650,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.pts</option>
+            <option>lxc.pty.max</option>
           </term>
           <listitem>
             <para>
index dc5a175a91e3e0ad012b53f3af2307c9416e11f1..69bd4db98dc5900111cadd6a0e7147e900866d96 100644 (file)
@@ -75,7 +75,7 @@ lxc_log_define(lxc_confile, lxc);
 
 
 lxc_config_define(personality);
-lxc_config_define(pts);
+lxc_config_define(pty_max);
 lxc_config_define(tty_max);
 lxc_config_define(tty_dir);
 lxc_config_define(apparmor_profile);
@@ -135,10 +135,15 @@ lxc_config_define(prlimit);
 
 static struct lxc_config_t config[] = {
        { "lxc.arch",                      set_config_personality,                 get_config_personality,                 clr_config_personality,               },
-       { "lxc.pts",                       set_config_pts,                         get_config_pts,                         clr_config_pts,                       },
+       { "lxc.pty.max",                   set_config_pty_max,                     get_config_pty_max,                     clr_config_pty_max,                   },
        { "lxc.tty.dir",                   set_config_tty_dir,                     get_config_tty_dir,                     clr_config_tty_dir,                   },
        { "lxc.tty.max",                   set_config_tty_max,                     get_config_tty_max,                     clr_config_tty_max,                   },
 
+       /* REMOVE IN LXC 3.0
+          legacy pts key
+        */
+       { "lxc.pts",                       set_config_pty_max,                     get_config_pty_max,                     clr_config_pty_max,                   },
+
        /* REMOVE IN LXC 3.0
           legacy devttydir key
         */
@@ -1162,8 +1167,8 @@ static int set_config_personality(const char *key, const char *value,
        return 0;
 }
 
-static int set_config_pts(const char *key, const char *value,
-                         struct lxc_conf *lxc_conf, void *data)
+static int set_config_pty_max(const char *key, const char *value,
+                             struct lxc_conf *lxc_conf, void *data)
 {
        /* Set config value to default. */
        if (lxc_config_value_empty(value)) {
@@ -2794,8 +2799,8 @@ static int get_config_personality(const char *key, char *retv, int inlen,
        return fulllen;
 }
 
-static int get_config_pts(const char *key, char *retv, int inlen,
-                         struct lxc_conf *c, void *data)
+static int get_config_pty_max(const char *key, char *retv, int inlen,
+                             struct lxc_conf *c, void *data)
 {
        return lxc_get_conf_int(c, retv, inlen, c->pts);
 }
@@ -3366,8 +3371,8 @@ static inline int clr_config_personality(const char *key, struct lxc_conf *c,
        return 0;
 }
 
-static inline int clr_config_pts(const char *key, struct lxc_conf *c,
-                                void *data)
+static inline int clr_config_pty_max(const char *key, struct lxc_conf *c,
+                                    void *data)
 {
        c->pts = 0;
        return 0;
index 21e630417d4e8ed2f10964d7bc0914ff37b66477..5550d96c9051592ffedaf7bbf7f4d09c64434c03 100644 (file)
@@ -300,13 +300,22 @@ int main(int argc, char *argv[])
                goto non_test_error;
        }
 
-       /* lxc.pts */
+       /* REMOVE IN LXC 3.0
+          legacy ps keys
+        */
        if (set_get_compare_clear_save_load(c, "lxc.pts", "1000", tmpf, true) <
            0) {
                lxc_error("%s\n", "lxc.pts");
                goto non_test_error;
        }
 
+       /* lxc.pty.max */
+       if (set_get_compare_clear_save_load(c, "lxc.pty.max", "1000", tmpf, true) <
+           0) {
+               lxc_error("%s\n", "lxc.pty.max");
+               goto non_test_error;
+       }
+
        /* REMOVE IN LXC 3.0
           legacy tty.max keys
         */
index c39c575b7f876df8de2b2dd248d592f4ab0e1fda..9fde9e37c3f66f1f60fb87739a2de970d8d97d50 100644 (file)
@@ -278,7 +278,7 @@ copy_configuration()
     cat <<EOF >> $config_path/config
 lxc.uts.name = $name
 lxc.tty.max = 4
-lxc.pts = 1024
+lxc.pty.max = 1024
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
 
 # When using LXC with apparmor, uncomment the next line to run unconfined:
index 36572df5d333a700da22805eee60ad12d33b0ed2..c4ba27555741c8a6097c1e4e75b0ab519a5136a6 100644 (file)
@@ -345,7 +345,7 @@ lxc.signal.halt = SIGUSR1
 lxc.rebootsignal = SIGTERM
 lxc.uts.name = $name
 lxc.tty.max = 1
-lxc.pts = 1
+lxc.pty.max = 1
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
 
 # When using LXC with apparmor, uncomment the next line to run unconfined:
index a5a8c5e9f0650adfbab9129d19fda449c0ce411f..e884086a9eba807ddfa7c6c4764268df9222a7d7 100644 (file)
@@ -121,7 +121,7 @@ cat >> "$path/config" <<EOF
 lxc.rootfs.path = $rootfs
 
 lxc.tty.max = 4
-lxc.pts = 1024
+lxc.pty.max = 1024
 
 lxc.uts.name = $name
 lxc.arch = $arch
index 22c6bb1ba0246d8d1d295728968b3c33cafe2046..5cbfcd1f2fc8f19b073214a712e71585d0b777df 100644 (file)
@@ -517,7 +517,7 @@ copy_configuration()
 lxc.tty.max = $num_tty
 lxc.uts.name = $hostname
 lxc.arch = $arch
-lxc.pts=1023
+lxc.pty.max = 1024
 EOF
 
     if [ $? -ne 0 ]; then
index a552165436ff5031963e6b813b5a137fda4dee3e..60dee6a7f6eef6cc295d70f53e7639c606c314b4 100644 (file)
@@ -230,7 +230,7 @@ copy_configuration()
     cat <<EOF >> $config_path/config
 lxc.uts.name = $name
 lxc.tty.max = 4
-lxc.pts = 1024
+lxc.pty.max = 1024
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
 lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
 
index 49a8149aa898d2a0c591367b8856965de24b48ac..1f4f3641e67bfab24c89ab21c89dda9db86d6bba 100644 (file)
@@ -240,7 +240,7 @@ copy_configuration()
 # lxc.include = /usr/share/lxc/config/common.conf
 lxc.uts.name = $utsname
 lxc.tty.max = 4
-lxc.pts = 1024
+lxc.pty.max = 1024
 # Consider if below line is right for systemd container
 lxc.mount.fstab = $config_path/fstab
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
index 14c03270ad751af2ad3a0ed8b983874a45c92904..3e410c3cdbe8cb060b4d1742036e7c200f90ff8f 100644 (file)
@@ -130,7 +130,7 @@ copy_configuration()
     grep -q "^lxc.rootfs.path" $path/config 2>/dev/null || echo "lxc.rootfs.path = $rootfs" >> $path/config
 cat <<EOF >> $path/config
 lxc.uts.name = $name
-lxc.pts = 1024
+lxc.pty.max = 1024
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
 
 # When using LXC with apparmor, uncomment the next line to run unconfined: