[lxc-devel] [lxc/lxc] 6f7cf1: conf: fix tty creation

GitHub noreply at github.com
Sun Sep 24 04:43:41 UTC 2017


  Branch: refs/heads/stable-2.0
  Home:   https://github.com/lxc/lxc
  Commit: 6f7cf1705e1637ec0f439d6b9882a02d2e71af14
      https://github.com/lxc/lxc/commit/6f7cf1705e1637ec0f439d6b9882a02d2e71af14
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  conf: fix tty creation

We allocate pty {master,slave} file descriptors in the childs namespaces after
we have setup devpts. After we have sent the pty file descriptors to the parent
and set up the pty file descriptors under /dev/tty* and before we exec the init
binary we need to delete these file descriptors in the child. However, one of
my commits made the deletion occur before setting up the file descriptors under
/dev/tty*. This caused a failures when trying to attach to the container's ttys
since they werent actually configured although the file descriptors were
available in the in-memory configuration of the parent.
This commit reworks setting up tty such that deletion occurs after all setup
has been performed. The commit is actually minimal but needs to also move all
the functions into one place since they well now be called from
"lxc_create_ttys()".

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: eb8f5b73cdc179cc36e0bb694d2263f9dd9f78e8
      https://github.com/lxc/lxc/commit/eb8f5b73cdc179cc36e0bb694d2263f9dd9f78e8
  Author: Wolfgang Bumiller <w.bumiller at proxmox.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/network.c

  Log Message:
  -----------
  network: add missing checks for empty links

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>


  Commit: b7b11f3bd2dec2d4ded6f21488b28ad64369a336
      https://github.com/lxc/lxc/commit/b7b11f3bd2dec2d4ded6f21488b28ad64369a336
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/conf.c
    M src/lxc/conf.h

  Log Message:
  -----------
  conf: add userns_exec_full()

Closes #1800.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 6d7128904e80e770b6e3a7ba3531452b0bdc4a6f
      https://github.com/lxc/lxc/commit/6d7128904e80e770b6e3a7ba3531452b0bdc4a6f
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use userns_exec_full()

Closes #1800.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 369d1bc657735204f28e3dc6f265ad7cc69fd135
      https://github.com/lxc/lxc/commit/369d1bc657735204f28e3dc6f265ad7cc69fd135
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: userns_exec_full()

Closes #1800.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 8f5786da47a60bbcf487967df7885ef6f8f1ea6b
      https://github.com/lxc/lxc/commit/8f5786da47a60bbcf487967df7885ef6f8f1ea6b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/console.c

  Log Message:
  -----------
  console: remove dead assignments

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 4af1de0eb312710a3f437e9a8d7fa7510f091978
      https://github.com/lxc/lxc/commit/4af1de0eb312710a3f437e9a8d7fa7510f091978
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/monitor.c

  Log Message:
  -----------
  monitor: remove dead assignment

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 0b78cd52181070661630f0a217ed2e1255fe801a
      https://github.com/lxc/lxc/commit/0b78cd52181070661630f0a217ed2e1255fe801a
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: remove dead variable

non-functional changes

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 07fdfa637eb4c1e6452ba386478cd41bb642becb
      https://github.com/lxc/lxc/commit/07fdfa637eb4c1e6452ba386478cd41bb642becb
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/criu.c

  Log Message:
  -----------
  criu: use correct check initialization check

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: c04e54bd462e8581ede9aa175e2b88ad15a800a5
      https://github.com/lxc/lxc/commit/c04e54bd462e8581ede9aa175e2b88ad15a800a5
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  utils: do not write to 0 sized buffer

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 27a516a843fb93243256314cc66e4436917ff7e6
      https://github.com/lxc/lxc/commit/27a516a843fb93243256314cc66e4436917ff7e6
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/confile_utils.c

  Log Message:
  -----------
  confile: parse_idmaps() remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 8283b0e57a205029fd3118e8408890ba13797eb4
      https://github.com/lxc/lxc/commit/8283b0e57a205029fd3118e8408890ba13797eb4
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/tools/lxc_unshare.c

  Log Message:
  -----------
  lxc-unshare: do not pass NULL pointer

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: bc87889f861b4bac28c482c0c3bf022e98a168fe
      https://github.com/lxc/lxc/commit/bc87889f861b4bac28c482c0c3bf022e98a168fe
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/tools/lxc_usernsexec.c

  Log Message:
  -----------
  lxc_usernsexec: remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: b1514e67ca8dd95c3e42a8c226a3532efff94e70
      https://github.com/lxc/lxc/commit/b1514e67ca8dd95c3e42a8c226a3532efff94e70
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/tests/containertests.c
    M src/tests/destroytest.c
    M src/tests/saveconfig.c
    M src/tests/shortlived.c
    M src/tests/startone.c

  Log Message:
  -----------
  tests: remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: adf5a69928f2fed563d4f771ef8be3e20727dcdf
      https://github.com/lxc/lxc/commit/adf5a69928f2fed563d4f771ef8be3e20727dcdf
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/tests/concurrent.c

  Log Message:
  -----------
  tests: avoid NULL pointer dereference

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: aaf09f6803582c602e54b056957f2c3b2bb12465
      https://github.com/lxc/lxc/commit/aaf09f6803582c602e54b056957f2c3b2bb12465
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  utils: lxc_popen() remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: f9ae13de21177c4b2c6bb550d61dda79d1c8295b
      https://github.com/lxc/lxc/commit/f9ae13de21177c4b2c6bb550d61dda79d1c8295b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  lxc-user-nic: remove double initialization

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 11e89cc11f51914fadc483e7666476d4e3a3b313
      https://github.com/lxc/lxc/commit/11e89cc11f51914fadc483e7666476d4e3a3b313
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: switch ids at last possible instance

This is technically not necessary but it is a privilege sensitive operation.
Meaning if anyone wants to do something that requires privilege it should be
done before the id switch. So let's move the id switch immediately before the
exec so that it's called at the last possible moment.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 0c5f4f18e57accaa77f45dc811ca638c4d33ef99
      https://github.com/lxc/lxc/commit/0c5f4f18e57accaa77f45dc811ca638c4d33ef99
  Author: KATOH Yasufumi <karma at jazz.email.ne.jp>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M templates/lxc-plamo.in

  Log Message:
  -----------
  plamo: Delete unnecessary process during container shutdown

Since some remounts/umounts is executed in the plamo shutdown script,
the filesystem on where a container exists might be mount as
read-only. This patch delete some mounts and umounts from the shutdown
script. It also delete hwclock setting process.

And delete an unncecessary output.

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>


  Commit: 4e2849f83a5d2d2c4dc72737cd0d16c35e51660b
      https://github.com/lxc/lxc/commit/4e2849f83a5d2d2c4dc72737cd0d16c35e51660b
  Author: Christian von Roques <roques at mti.ag>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M doc/lxc-monitor.sgml.in

  Log Message:
  -----------
  fix regex-typo in lxc-monitor.sgml.in

To match names beginning with the letters "f" or "b" one can use
the regular expression "[fb].*" or "(f|b).*", but not "[f|b].*",
which would match strings beginning with "f", "|", or "b".

Signed-off-by: Christian von Roques <roques at z12.ch>


  Commit: b03a38722922d2219be518f7a29002a4746fcdba
      https://github.com/lxc/lxc/commit/b03a38722922d2219be518f7a29002a4746fcdba
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: move env setup before container setup

The hooks (e.g. lxc.hook.mount) should have the environment variables the user
gave us available.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 593c29a97c52be6d61e0857857e19f6d4c1442d2
      https://github.com/lxc/lxc/commit/593c29a97c52be6d61e0857857e19f6d4c1442d2
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: set environment variables correctly

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 7ed15e7b77dac1e82b82376b562455052115acc1
      https://github.com/lxc/lxc/commit/7ed15e7b77dac1e82b82376b562455052115acc1
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: pass LXC_LOG_LEVEL to hooks

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 4443ee50d6411ab508392073c5eb35ad6930486a
      https://github.com/lxc/lxc/commit/4443ee50d6411ab508392073c5eb35ad6930486a
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  utils: duplicate stderr as well in lxc_popen()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: e4d234a2f36ca3d06031f13d3a48efa70ab593e5
      https://github.com/lxc/lxc/commit/e4d234a2f36ca3d06031f13d3a48efa70ab593e5
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/lxc/utils.c
    M src/lxc/utils.h

  Log Message:
  -----------
  utils: fix lxc_popen()/lxc_pclose()

- rework and fix pipe fd leak

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 4b3053e9193ee6e5aaa67f2a1add6d99f42e574f
      https://github.com/lxc/lxc/commit/4b3053e9193ee6e5aaa67f2a1add6d99f42e574f
  Author: Rune Juhl Jacobsen <runejuhl at petardo.dk>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M templates/lxc-alpine.in

  Log Message:
  -----------
  Change file check to also check file size (`-f` => `-s`)

Because the `fetch` wget wrapper outputs files to stdout we may end up in a
situation where wget fails but the files are still created. This can happen
e.g. when the host date is out of sync leading to a failed certificate
check, resulting in the creation of empty key files.

Once the empty files have been created the template will try to use them which
causes the certificate check to fail.

By using `-s` instead of `-f` the template will re-fetch the files unless they
exist AND have a size greater than zero.

Signed-off-by: Rune Juhl Jacobsen <runejuhl at petardo.dk>


  Commit: c90411d76f5228774e7241b17daa9d69b250df37
      https://github.com/lxc/lxc/commit/c90411d76f5228774e7241b17daa9d69b250df37
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M src/tests/lxc-test-apparmor-mount
    M src/tests/lxc-test-unpriv
    M src/tests/lxc-test-usernic.in

  Log Message:
  -----------
  tests: Support systemd hybrid cgroups

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 7d9d482b742070b0596518afc93067a6b02f75f5
      https://github.com/lxc/lxc/commit/7d9d482b742070b0596518afc93067a6b02f75f5
  Author: KATOH Yasufumi <karma at jazz.email.ne.jp>
  Date:   2017-09-24 (Sun, 24 Sep 2017)

  Changed paths:
    M doc/ja/lxc-monitor.sgml.in
    M doc/ko/lxc-monitor.sgml.in

  Log Message:
  -----------
  doc: fix regex-typo in Japanese and Korean lxc-monitor(1)

Update for commit e3dd06ef41b63d0ee362fea74a3f2d798dbfe929

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>


Compare: https://github.com/lxc/lxc/compare/44a43f52b429...7d9d482b7420


More information about the lxc-devel mailing list