Commit Graph

6765 Commits

Author SHA1 Message Date
Stéphane Graber
b195038dfc
configure.ac: Support redhatenterpriseserver
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 15:21:51 -04:00
Stéphane Graber
769cf3c1cc
Release LXC 3.0.0.beta4
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-26 23:38:01 -04:00
Stéphane Graber
f4ffd9f873
Merge pull request #2237 from brauner/2018-03-26/always_make_dumpable
start: always make us dumpable
2018-03-26 18:11:31 -04:00
Christian Brauner
d788372535
start: always make us dumpable
Otherwise lxc.hook.mount hooks that try to inspect /proc/<pid>/*
will fail.

Cc: Jonathan Calmels <jcalmels@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-26 23:04:12 +02:00
Stéphane Graber
065d5d0d3a
Merge pull request #2235 from brauner/2018-03-25/simplify_autodev
conf: simplify autodev
2018-03-25 22:30:58 -04:00
Christian Brauner
5e73416ffe
conf: simplify lxc_fill_autodev()
This function was way more syscall heavy than it needed to be.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-26 02:21:56 +02:00
Stéphane Graber
6af6b30a87
Merge pull request #2232 from flx42/dhclient-hook-apparmor
hooks: fix dhclient hook when an AppArmor profile is active
2018-03-24 00:36:32 -04:00
Stéphane Graber
b53a26168c
Release LXC 3.0.0.beta3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 16:22:00 -04:00
Stéphane Graber
2715bbf9bc
Merge pull request #2233 from brauner/2018-03-23/truncate_config_file
lxccontainer: truncate config file
2018-03-23 15:44:52 -04:00
Christian Brauner
10034af509
lxccontainer: truncate config file
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-23 20:30:38 +01:00
Christian Brauner
cc8d4ec015
Merge pull request #2231 from stgraber/master
pam: Fix missing symbols in module
2018-03-23 18:54:22 +01:00
Felix Abecassis
41be52e8ab hooks: fix dhclient hook when an AppArmor profile is active
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-23 10:47:35 -07:00
Stéphane Graber
60534f79d2
pam: Fix missing symbols in module
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 13:26:24 -04:00
Stéphane Graber
1b849a8ffa
Merge pull request #2229 from fliiiix/lxc_net_improvements
Rename ifup/down and remove usless parameter passing
2018-03-22 12:35:43 -04:00
Christian Brauner
dad96df80b
Merge pull request #2230 from tych0/drop-log-whitespace
remove leading whitespace from log files
2018-03-22 17:22:55 +01:00
fliiiix
1b459eded4 Rename ifup/down and remove usless parameter passing
Signed-off-by: Felix <de-ch@hotmail.de>
2018-03-22 17:11:17 +01:00
Tycho Andersen
512845bc10 remove leading whitespace from log files
This has annoyed me for a long time, 3.0 seems like the time to fix it :).

I think the way that the log prefix was intended to be used was perhaps a
dynamic prefix per file, but we don't do that today; we include the
filename later in the log message. Instead, we use it as the tool name,
which for liblxc is always "lxc", but could also be things like
"lxc-cgroup" or whatever. There is absolutely no reason to pad this, since
it is always the same for every log file (in fact, we could probably get
rid of the prefix all together, but that seems slightly more drastic).

Instead, let's just drop this padding. Hopefully this will save thousands
of hours of slight annoyance and right scrolling in various pastebins.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2018-03-22 09:49:08 -06:00
Christian Brauner
4c6fb19b30
Merge pull request #2225 from flx42/nvidia-hook-fixes
NVIDIA hook improvements
2018-03-19 23:57:42 +01:00
Felix Abecassis
89f1ef110e hooks: implement passthrough for latest features of libnvidia-container
The "display" driver capability will expose /dev/nvidia-modeset:
9398d41d9f

The "--ldcache" argument allows overriding the location of the DSO cache:
41656bf9ed

The "--root" argument allows nvidia-container-cli to execute in a different rootfs:
019fdc14e3

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-19 15:38:53 -07:00
Felix Abecassis
4a0a5e89e1 hooks: fix nvidia hook when running under the lxc-start AppArmor profile
For a reason that I don't understand, the profile transition needs to
be done on the current process. Changing the attributes for a
subsequent execve(2) (with /proc/self/attr/exec) will cause the kernel
to set AT_SECURE in the auxiliary vector and thus secure_getenv(3)
inside libnvidia-container will return NULL.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-19 15:34:49 -07:00
Stéphane Graber
14f16c4171
Release LXC 3.0.0.beta2
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-19 16:05:53 -04:00
Christian Brauner
d343541545
Merge pull request #2223 from flx42/fix-lxc-execute-use-after-free
tools: fix container use-after-free
2018-03-16 23:16:22 +01:00
Felix Abecassis
020c90b702 tools: fix container use-after-free
Fields daemonize and error_num were being called after the
lxc_container_put.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-16 13:31:25 -07:00
Christian Brauner
4edd0ba7fe
Merge pull request #2222 from tenforward/japanese
doc: Remove aufs in Japanese man pages
2018-03-16 10:55:49 +01:00
KATOH Yasufumi
07a911c854 doc: Remove aufs in Japanese man pages
* and tweak English lxc-copy(1)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-03-16 18:40:14 +09:00
Serge Hallyn
03a0a42b99
Merge pull request #2210 from brauner/2018-03-10/conf_cleanups
tree-wide: remove aufs storage driver
2018-03-15 12:00:37 -05:00
Christian Brauner
a8984858e7
terminal: s/Theh/The/
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-15 17:30:57 +01:00
Christian Brauner
949d0338c6
conf: initialize pflags
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-15 17:30:57 +01:00
Christian Brauner
0fd7309137
conf: coding style changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-15 17:30:55 +01:00
Christian Brauner
12e6ab5d23
tree-wide: remove aufs storage driver
We've announced quite a while back and printed out errors and warning everytime
someone used the aufs driver.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-15 17:24:49 +01:00
Christian Brauner
9d257a2a23
conf: order includes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-03-15 17:24:45 +01:00
Christian Brauner
0e83121caa
Merge pull request #2221 from tych0/fix-use-after-free
fix handler use-after-free
2018-03-15 16:52:39 +01:00
Tycho Andersen
a3b4f3d680 fix handler use-after-free
The problem here is that __lxc_start frees the handler, so any use
afterwards is invalid. Since we don't have access to the actual struct
lxc_container object in __lxc_start, let's pass a pointer to error_num in
so it can be returned.

Unfortunately, I'm a little too paranoid to change the return type of
lxc_start, since it returns failure if some of the cleanup fails, which
may be useful in some cases. So let's keep this out of band.

Closes #2218
Closes #2219

Reported-by: Felix Abecassis <fabecassis@nvidia.com>
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2018-03-15 15:29:27 +00:00
Christian Brauner
d61bda5fcb
Merge pull request #2217 from flx42/fix-mount-hooks-double-call
conf: do not run the "mount" hooks twice
2018-03-15 00:37:17 +01:00
Felix Abecassis
1a2cf89d99 conf: do not run the "mount" hooks twice
Regression introduced by 8353b4c90e

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-14 16:20:18 -07:00
Christian Brauner
55fc780b23
Merge pull request #2216 from igalic/fix/clang-warning
conf: fix clang warning when building w/o libcap
2018-03-14 17:27:55 +01:00
Igor Galić
8560cd364b
conf: fix clang warning when building w/o libcap
when compiling lxc with clang-5.0 parse_cap()'s main loop will produce a
warning about a tautological comparision (#2215).

By moving the result of computation into a variable (end) this is no
longer a constant expression. clang-5.0 does not do dataflow analysis at
this point, so it is, to quote someone from #llvm, "morally equivalent"
to casting `(int)i`.

in addition, we also clean up the #if HAVE_LIBCAP to no longer need
its #else branch!

Signed-off-by: Igor Galić <igor.galic@automatic-server.com>
2018-03-14 17:01:39 +01:00
Christian Brauner
0b628094f8
Merge pull request #2214 from flx42/fix-lxc-execute
tools: fix usage of boolean function set_config_item
2018-03-14 06:31:54 +01:00
Felix Abecassis
e2eae70354 tools: fix usage of boolean function set_config_item
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-13 21:50:46 -07:00
Christian Brauner
93936fbc7b
Merge pull request #2213 from hallyn/2018-03-13/revert-cg
Revert "cgroups: don't escape if we're not real root"
2018-03-13 20:11:03 +01:00
Serge Hallyn
53386adb78 Revert "cgroups: don't escape if we're not real root"
This reverts commit 8d961e28f1.

Unfortunately I don't believe the check is correct in the general case.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2018-03-13 13:01:51 -05:00
Christian Brauner
f432873366
Merge pull request #2212 from tych0/cgroup-escape-host-unpriv
cgroups: don't escape if we're not real root
2018-03-13 17:14:15 +01:00
Tycho Andersen
8d961e28f1 cgroups: don't escape if we're not real root
If we're host unpriv but root in our userns, we can't really escape
cgroups. Let's switch the cgroup escape test to reflect this.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2018-03-13 15:57:10 +00:00
Serge Hallyn
e3bc3b8645
Merge pull request #2211 from tych0/usernsexec-init-log
usernsexec: init log fd
2018-03-12 11:31:46 -05:00
Tycho Andersen
2d22b22dd4 usernsexec: init log fd
lxc-usernsexec uses some functions (e.g. lxc_map_ids()), which are part of
the lxc library and thus use the WARN etc. macros to emit log messages.
However, it doesn't initialize the log in any way, so these messages go
into the ether.

lxc-usernsexec currently has no log parameters, so let's just log these to
stderr. Someone can do something fancier later if they want.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
2018-03-12 09:39:37 -06:00
Christian Brauner
f392f4edf3
Merge pull request #2209 from tenforward/fix_personality
tools: Include config.h in tool_utils.c
2018-03-09 10:42:24 +01:00
KATOH Yasufumi
2e607d1c13 tools: Include config.h in tool_utils.c
Since we do not include config.h, personality is not set. This is fix
it. See issue #2208.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-03-09 17:53:09 +09:00
Christian Brauner
9574bd59a3
Merge pull request #2203 from flx42/fix-libcap-amzn1
Add a workaround for a build issue with old versions of libcap
2018-03-03 07:33:18 +01:00
Felix Abecassis
9cd5f7fa1c Add a workaround for a build issue with old versions of libcap
Fixes: #2178

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-03-02 22:03:25 -08:00
Christian Brauner
844a5c73cf
Merge pull request #2202 from brauner/2018-03-02/coding_style_update
CODING_STYLE: update
2018-03-02 13:01:13 +01:00