Commit Graph

7659 Commits

Author SHA1 Message Date
Christian Brauner
8018dce8c7
string_utils: remove unnecessary include
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 15:37:41 +02:00
Christian Brauner
bcf6424544
initutils: remove useless comment
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 15:37:04 +02:00
Christian Brauner
1b0575412a
{file,string}_utils: remove NO_LOG
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 15:36:15 +02:00
Wolfgang Bumiller
38bce1541e
Merge pull request #2564 from brauner/2018-08-22/strerror_r_detection
log: handle strerror_r() versions + autotools: add --{disable,enable}-thread-safety
2018-08-22 14:24:08 +02:00
Christian Brauner
d6457631f0
log: fail build on ENFORCE_THREAD_SAFETY error
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 13:42:19 +02:00
Christian Brauner
81c76cff14
autotools: add --{disable,enable}-thread-safety
Fail the build if --enable-thread-safety is passed and the environment cannot
guarantee thread-safety.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 13:41:43 +02:00
Christian Brauner
607e3fcae1
log: handle strerror_r() versions
Closes #2563.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 13:41:41 +02:00
Christian Brauner
027e437ccb
Merge pull request #2562 from brauner/2018-08-22/check_compiler
autotools: check if compiler is new enough
2018-08-22 01:57:28 +02:00
Christian Brauner
95ef0d7c0d
start: add out_sync_fini cleanup label
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 01:54:40 +02:00
Christian Brauner
9b5724cd58
autotools: check if compiler is new enough
We line up with the Linux kernel and won't support any compiler under 4.6.
Additionally, we also require at least gnu99 so this is due anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-22 00:04:19 +02:00
Stéphane Graber
577abe431b
Merge pull request #2554 from brauner/2018-08-21/attach_fixes
attach: bugfixes
2018-08-21 11:59:55 -04:00
Stéphane Graber
723abbab3d
Merge pull request #2561 from brauner/2018-08-21/test_pam_cgfs
Makefile: don't allow undefined symbols
2018-08-21 11:58:01 -04:00
Christian Brauner
9089937b5e
Makefile: don't allow undefined symbols
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 17:27:25 +02:00
Christian Brauner
604ca1c06b
macro: move macros from attach.c
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 16:55:07 +02:00
Christian Brauner
ef05d36887
attach: move struct declaration to top
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 16:54:36 +02:00
Christian Brauner
c7ac2e1ca7
macro: s/rexit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 16:54:34 +02:00
Stéphane Graber
ac907950d8
Merge pull request #2560 from brauner/2018-08-21/fix_fully_unprivileged_containers
conf: fix devpts mounting when fully unprivileged
2018-08-21 10:53:57 -04:00
Stéphane Graber
d5f670c12c
Merge pull request #2558 from brauner/2018-08-21/pam_cgfs
pam_cgfs: build from the same sources as liblxc
2018-08-21 10:52:46 -04:00
Christian Brauner
ce155c606d
conf: fix devpts mounting when fully unprivileged
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 16:16:36 +02:00
Christian Brauner
71174d464f
pam_cgfs: build from the same sources as liblxc
Closes #2556.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 13:01:44 +02:00
Christian Brauner
37ef15bbd2
utils: split into {file,string}_utils.{c,h}
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-21 13:00:20 +02:00
Christian Brauner
f8f3f6672e
Merge pull request #2559 from ssup2/master
start: Fix net iface remaining issue
2018-08-21 12:59:49 +02:00
Jungsub Shin
78852a0c17 start: Fix net iface remaining issue
When creating container that has multiple net ifaces fails
because of wrong net config, lxc doesn't remove previously created
net ifaces.

Solve this issue with changing return path in lxc_spawn().

Signed-off-by: Jungsub Shin jungsub_shin@tmax.co.kr
2018-08-21 19:21:59 +09:00
Christian Brauner
501751d09a
Merge pull request #2555 from tcharding/clang-format-cmd
cmd: Fix format issues found by clang-format
2018-08-21 11:25:34 +02:00
Christian Brauner
3c84108681
Merge pull request #2557 from 2xsec/bugfix
list: fix indent
2018-08-21 11:24:52 +02:00
2xsec
ca9a25048b
list: fix indent
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-08-21 15:02:06 +09:00
Tobin C. Harding
2ec1c48453 cmd: Fix format issues found by clang-format
clang-format finds a few format issues, lets fix these up.

Fix format issues found by clang-format.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
2018-08-21 09:56:26 +10:00
Christian Brauner
06d390dfb9
Merge pull request #2552 from tcharding/cpp-check
cmd: Lint with cppcheck
2018-08-21 01:37:31 +02:00
Tobin C. Harding
aac44dc4ff cmd: Reduce scope of 'count' variable
Variable is used in one plaice only within a nested statement block.
The code is cleaner if the variable is declared near where it is used.
Found using cppcheck.

Reduce the scope of 'count' variable.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
2018-08-21 09:25:30 +10:00
Tobin C. Harding
ba464e9b66 cmd: Do not reassign variable before it is used
cppcheck emits warning

  Variable 'ofd' is reassigned a value before the old one has been used.

We do not need to initialise a variable if it is assigned to on first use.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
2018-08-21 09:25:30 +10:00
Wolfgang Bumiller
86cea5d143
Merge pull request #2549 from brauner/2018-08-19/cmd_usernsexec_fixes
cmd: lxc-usernsexec fixes + macro: move declarations + config_utils: macvlan fixes
2018-08-20 15:35:10 +02:00
Christian Brauner
62a38dfff0
cmd: use goto for cleanup in lxc-usernsexec
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-20 15:16:33 +02:00
Christian Brauner
87a70c5703
Merge pull request #2550 from 2xsec/bugfix
storage: exit() => _exit()
2018-08-20 12:34:15 +02:00
Christian Brauner
de206187cd
Merge pull request #2542 from tcharding/signal-fail-2523
tools: Indicate container startup failure
2018-08-20 12:33:45 +02:00
Christian Brauner
4f9500b1a5
Merge pull request #2553 from Blub/ttydir-path-fixup
conf: fix path/lxcpath mixups in tty setup
2018-08-20 10:37:50 +02:00
Wolfgang Bumiller
adc1c7156c conf: fix path/lxcpath mixups in tty setup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: 6947153da ("conf: use mknod() to create dummy mount target")
2018-08-20 10:07:08 +02:00
2xsec
75457df5dc
tools: lxc-wait: add default log priority & cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-08-20 10:43:22 +09:00
2xsec
2c70300ad8
storage: exit() => _exit(). when exec is failed, child process needs to use _exit()
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-08-20 10:41:50 +09:00
Tobin C. Harding
e3e70db364 tools: Indicate container startup failure
When running lxc-autostart we do not currently indicate failure to start
containers, either partial failure i.e. some of the containers failed to
start or total failure i.e. all of the containers failed to start.

Indicate container startup failure.  For total failure exit(1), for
partial failure exit(2).

Signed-off-by: Tobin C. Harding <me@tobin.cc>
2018-08-20 09:00:14 +10:00
Christian Brauner
7b15813c33
macro: add macvlan properties
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:46 +02:00
Christian Brauner
85de58d6e3
macro: add missing headers
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:45 +02:00
Christian Brauner
d3b413e7d5
cmd: use safe number parsers in lxc-usernsexec
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:45 +02:00
Christian Brauner
5ff0284480
cmd: simplify lxc-usernsexec
Calculate length only once.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:45 +02:00
Christian Brauner
197c9293a6
cmd: use utils.{c,h} helpers in lxc-usernsexec
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:45 +02:00
Christian Brauner
c881c8101b
cmd: move declarations to macro.h
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:45 +02:00
Christian Brauner
72a506941f
cmd: lxc-usernsexec reorder includes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-08-19 20:27:43 +02:00
Christian Brauner
89a9f3933b
Merge pull request #2548 from 2xsec/bugfix
cmd: lxc-user-nic: change log macro & cleanups
2018-08-19 12:03:27 +02:00
2xsec
3725a69c38 cmd: lxc-user-nic: change log macro & cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-08-19 12:45:54 +09:00
Serge Hallyn
59c018f20b
Merge pull request #2547 from brauner/2018-08-18/fix_execute_parsing
tools: fix lxc-execute command parsing
2018-08-18 11:35:11 -05:00
Christian Brauner
0a4f0d02d8
Merge pull request #2545 from ljagiello/integer-overflow
storage/loop.c: integer overflow
2018-08-18 18:05:19 +02:00