[lxc-devel] [lxc/lxc] e59536: RFC: lxclock: drop the chown+chmod of lockdir

GitHub noreply at github.com
Mon Sep 30 22:21:44 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: e59536145cbcfc16e2578819d5ee547455aa56d4
      https://github.com/lxc/lxc/commit/e59536145cbcfc16e2578819d5ee547455aa56d4
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-09-30 (Mon, 30 Sep 2013)

  Changed paths:
    M src/lxc/lxclock.c

  Log Message:
  -----------
  RFC: lxclock: drop the chown+chmod of lockdir

The original rationale for this was to make sure that if
lxcpath was /home/serge/lxcbase, then then lockdir
(/run/user/serge/lock/lxc/home/serge/lxcbase) would be
owned by the same user as /home/serge/lxcbase.

The only user who can chown to other uids (without CAP_CHOWN
added to fP) is root, who shouldn't be mucking with non-root
owned containers anyway.  In the meantime this causes a bunch
of noise for arguably no benefit.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 6d03d92ab7f66f9b8e1da2371c9fb7265fd290a7
      https://github.com/lxc/lxc/commit/6d03d92ab7f66f9b8e1da2371c9fb7265fd290a7
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2013-09-30 (Mon, 30 Sep 2013)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  refactor string conf items into common function

- When doing the selinux change, I noticed that there was a lot of
  duplication of code in handing string configuration items, so I
  refactored this into a common function.

- Added a config_string_max that can be passed a maximum acceptable
  length, used to limit ttydir to NAME_MAX.

- The behavior of config_seccomp was different than other strings: if the
  item was already defined, then the second attempt to set it would fail
  instead of just replacing the value. Changed to just replace the value.

- Remove unused key and lxc_conf arguments to config_path_item().

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
Signed-off-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/243cae25b5b7...6d03d92ab7f6


More information about the lxc-devel mailing list