]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
5 years agoMerge pull request #2470 from brauner/2018-07-16/monitor_signal_pdeath
Stéphane Graber [Mon, 16 Jul 2018 12:05:15 +0000 (08:05 -0400)]
Merge pull request #2470 from brauner/2018-07-16/monitor_signal_pdeath

confile: add lxc.monitor.signal.pdeath

5 years agoconfile: add lxc.monitor.signal.pdeath
Christian Brauner [Mon, 16 Jul 2018 09:07:58 +0000 (11:07 +0200)]
confile: add lxc.monitor.signal.pdeath

Set the signal to be sent to the container's init when the lxc monitor exits.
By default it is set to SIGKILL which will cause all container processes to be
killed when the lxc monitor process dies.
To ensure that containers stay alive even if lxc monitor dies set this to 0.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile: move signal helpers to confile utils
Christian Brauner [Mon, 16 Jul 2018 09:10:01 +0000 (11:10 +0200)]
confile: move signal helpers to confile utils

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2469 from 2xsec/bugfix
Christian Brauner [Sat, 14 Jul 2018 15:50:47 +0000 (17:50 +0200)]
Merge pull request #2469 from 2xsec/bugfix

tools: lxc-unshare: use lxc list for interface names

5 years agocoverity: #1437949
2xsec [Sat, 14 Jul 2018 15:19:16 +0000 (00:19 +0900)]
coverity: #1437949

Argument cannot be negative

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-unshare: use lxc list for interface names
2xsec [Sat, 14 Jul 2018 14:56:34 +0000 (23:56 +0900)]
tools: lxc-unshare: use lxc list for interface names

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2468 from 2xsec/bugfix
Christian Brauner [Sat, 14 Jul 2018 14:47:20 +0000 (16:47 +0200)]
Merge pull request #2468 from 2xsec/bugfix

tools: lxc-unshare: apply argument parser of lxc and log system of lxc

5 years agotools: lxc-unshare: fix wrong coding rules
2xsec [Sat, 14 Jul 2018 13:07:59 +0000 (22:07 +0900)]
tools: lxc-unshare: fix wrong coding rules

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-unshare: apply argument parser of lxc and log system of lxc
2xsec [Sat, 14 Jul 2018 11:00:38 +0000 (20:00 +0900)]
tools: lxc-unshare: apply argument parser of lxc and log system of lxc

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2466 from flx42/fix-define-argument
Christian Brauner [Sat, 14 Jul 2018 00:09:46 +0000 (02:09 +0200)]
Merge pull request #2466 from flx42/fix-define-argument

 confile: fix incorrect strncmp

5 years agoconfile: fix incorrect strncmp
Felix Abecassis [Fri, 13 Jul 2018 23:45:55 +0000 (16:45 -0700)]
confile: fix incorrect strncmp

Passing additional configuration options with "--define" was broken.

Result of git bisect:
d899f11b7bfb14c4b532bc801de89c8fb46307d4 is the first bad commit

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2465 from 2xsec/bugfix
Christian Brauner [Fri, 13 Jul 2018 12:50:01 +0000 (14:50 +0200)]
Merge pull request #2465 from 2xsec/bugfix

lxclock: change error log using strerror to SYSERROR

5 years agolxclock: change error log using strerror to SYSERROR
2xsec [Fri, 13 Jul 2018 12:33:09 +0000 (21:33 +0900)]
lxclock: change error log using strerror to SYSERROR

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2462 from brauner/2018-07-12/coverity
Stéphane Graber [Thu, 12 Jul 2018 16:40:34 +0000 (12:40 -0400)]
Merge pull request #2462 from brauner/2018-07-12/coverity

coverity

5 years agocoverity: #1437935
Christian Brauner [Thu, 12 Jul 2018 15:52:09 +0000 (17:52 +0200)]
coverity: #1437935

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocoverity: #1437936
Christian Brauner [Thu, 12 Jul 2018 15:49:30 +0000 (17:49 +0200)]
coverity: #1437936

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2459 from brauner/2018-07-11/cleanup_makefile
Stéphane Graber [Thu, 12 Jul 2018 15:30:45 +0000 (11:30 -0400)]
Merge pull request #2459 from brauner/2018-07-11/cleanup_makefile

autotool fixes, attach cleanups

5 years agoMerge pull request #2460 from brauner/2018-07-12/handle_new_mknod_smarter
Stéphane Graber [Thu, 12 Jul 2018 14:08:44 +0000 (10:08 -0400)]
Merge pull request #2460 from brauner/2018-07-12/handle_new_mknod_smarter

conf: handle partially functional device nodes

5 years agoattach: cleanup log messages in lxc_attach()
Christian Brauner [Wed, 11 Jul 2018 21:45:03 +0000 (23:45 +0200)]
attach: cleanup log messages in lxc_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: use fd_cloexec()
Christian Brauner [Wed, 11 Jul 2018 21:43:38 +0000 (23:43 +0200)]
attach: use fd_cloexec()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: cleanup no_new_privs()
Christian Brauner [Wed, 11 Jul 2018 21:40:16 +0000 (23:40 +0200)]
attach: cleanup no_new_privs()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: cleanup fetch_seccomp()
Christian Brauner [Wed, 11 Jul 2018 21:38:31 +0000 (23:38 +0200)]
attach: cleanup fetch_seccomp()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: simplify lxc_attach_getpwshell()
Christian Brauner [Wed, 11 Jul 2018 21:12:04 +0000 (23:12 +0200)]
attach: simplify lxc_attach_getpwshell()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: handle partially functional device nodes
Christian Brauner [Thu, 12 Jul 2018 10:43:34 +0000 (12:43 +0200)]
conf: handle partially functional device nodes

This improves handling kernels which allow userspace to create partially
functional devices nodes.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2458 from 2xsec/bugfix
Christian Brauner [Wed, 11 Jul 2018 21:17:34 +0000 (23:17 +0200)]
Merge pull request #2458 from 2xsec/bugfix

tools: lxc-ls: fix signed_to_bigger_unsigned issue

5 years agoautotools: cleanup Makefile.am
Christian Brauner [Wed, 11 Jul 2018 20:35:44 +0000 (22:35 +0200)]
autotools: cleanup Makefile.am

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotools: lxc-ls: fix signed_to_bigger_unsigned issue
2xsec [Wed, 11 Jul 2018 12:59:18 +0000 (21:59 +0900)]
tools: lxc-ls: fix signed_to_bigger_unsigned issue

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2452 from brauner/2018-07-06/build_static_liblxc
Stéphane Graber [Mon, 9 Jul 2018 23:55:41 +0000 (19:55 -0400)]
Merge pull request #2452 from brauner/2018-07-06/build_static_liblxc

static liblxc, always create /dev directory when autodev = 1, open("/dev/null") opportunistically

5 years agostart: don't unconditionally open("/dev/null")
Christian Brauner [Mon, 9 Jul 2018 12:28:57 +0000 (14:28 +0200)]
start: don't unconditionally open("/dev/null")

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: create /dev directory
Christian Brauner [Mon, 9 Jul 2018 12:25:48 +0000 (14:25 +0200)]
conf: create /dev directory

If users specified lxc.autodev = 1 it does not make sense to skip setting up
autodev if /dev does not exist. We rather should create it.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoautotools: build both a shared and static liblxc
Christian Brauner [Fri, 6 Jul 2018 10:36:44 +0000 (12:36 +0200)]
autotools: build both a shared and static liblxc

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Tycho Andersen <tycho@tycho.ws>
5 years agoMerge pull request #2454 from 2xsec/bugfix
Christian Brauner [Sat, 7 Jul 2018 12:11:20 +0000 (14:11 +0200)]
Merge pull request #2454 from 2xsec/bugfix

tools: lxc-unshare: replace write_id_mapping() to the same function in conf.c

5 years agotools: lxc-unshare: replace write_id_mapping() to the same function in conf.c
2xsec [Sat, 7 Jul 2018 10:52:11 +0000 (19:52 +0900)]
tools: lxc-unshare: replace write_id_mapping() to the same function in conf.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2453 from 2xsec/bugfix
Christian Brauner [Fri, 6 Jul 2018 19:34:34 +0000 (21:34 +0200)]
Merge pull request #2453 from 2xsec/bugfix

add namespace api

5 years agotools: lxc-unshare: replace converting standard identifiers of namespaces to api
2xsec [Fri, 6 Jul 2018 16:20:53 +0000 (01:20 +0900)]
tools: lxc-unshare: replace converting standard identifiers of namespaces to api

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-attach: replace converting standard identifiers of namespaces to api
2xsec [Fri, 6 Jul 2018 16:16:41 +0000 (01:16 +0900)]
tools: lxc-attach: replace converting standard identifiers of namespaces to api

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agonamespace: add api to convert namespaces to standard identifiers
2xsec [Fri, 6 Jul 2018 16:10:10 +0000 (01:10 +0900)]
namespace: add api to convert namespaces to standard identifiers

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2451 from brauner/2018-07-06/bugfixes
Stéphane Graber [Fri, 6 Jul 2018 03:44:39 +0000 (23:44 -0400)]
Merge pull request #2451 from brauner/2018-07-06/bugfixes

bugfixes

5 years agotree-wide: set MSG_NOSIGNAL
Christian Brauner [Thu, 5 Jul 2018 23:15:38 +0000 (01:15 +0200)]
tree-wide: set MSG_NOSIGNAL

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: declare int array const
Christian Brauner [Thu, 5 Jul 2018 23:10:46 +0000 (01:10 +0200)]
start: declare int array const

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: refactor match_stdfds()
Christian Brauner [Thu, 5 Jul 2018 23:10:13 +0000 (01:10 +0200)]
start: refactor match_stdfds()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2450 from brauner/2018-07-05/use_mknod
Serge Hallyn [Thu, 5 Jul 2018 14:56:36 +0000 (10:56 -0400)]
Merge pull request #2450 from brauner/2018-07-05/use_mknod

conf: use mknod() to create dummy mount targets

5 years agoterminal: don't garble output
Christian Brauner [Thu, 5 Jul 2018 13:37:59 +0000 (15:37 +0200)]
terminal: don't garble output

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: use mknod() to create dummy mount targets
Christian Brauner [Wed, 4 Jul 2018 22:30:21 +0000 (00:30 +0200)]
conf: use mknod() to create dummy mount targets

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2446 from brauner/2018-07-02/log_prefix
Stéphane Graber [Wed, 4 Jul 2018 16:19:03 +0000 (12:19 -0400)]
Merge pull request #2446 from brauner/2018-07-02/log_prefix

Logging and cgroup fixes

5 years agoconf: use mknod() to create dummy mount target
Christian Brauner [Wed, 4 Jul 2018 12:54:15 +0000 (14:54 +0200)]
conf: use mknod() to create dummy mount target

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: safely retrieve path of slave device
Christian Brauner [Wed, 4 Jul 2018 12:51:48 +0000 (14:51 +0200)]
conf: safely retrieve path of slave device

openpty() is a horrible function that uses strcpy() into the char *name
argument if name != NULL. We can't rely on the path being sane in all cases so
let's split out the name retrieval to ttyname_r().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: use fd_cloexec()
Christian Brauner [Wed, 4 Jul 2018 12:49:17 +0000 (14:49 +0200)]
conf: use fd_cloexec()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocgfsng: respect lxc.cgroup.use
Christian Brauner [Wed, 4 Jul 2018 09:06:44 +0000 (11:06 +0200)]
cgfsng: respect lxc.cgroup.use

If lxc.cgroup.use is specified then only those controllers listed in there will
be used others will be skipped.

Closes #2447.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocgroups: remove is_crucial_cgroup_subsystem()
Christian Brauner [Wed, 4 Jul 2018 08:45:14 +0000 (10:45 +0200)]
cgroups: remove is_crucial_cgroup_subsystem()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2448 from 2xsec/bugfix
Christian Brauner [Wed, 4 Jul 2018 08:15:54 +0000 (10:15 +0200)]
Merge pull request #2448 from 2xsec/bugfix

log: remove the trailing .

5 years agolog: remove the trailing .
2xsec [Wed, 4 Jul 2018 08:01:45 +0000 (17:01 +0900)]
log: remove the trailing .

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agolog: cleanup
Christian Brauner [Mon, 2 Jul 2018 19:27:54 +0000 (21:27 +0200)]
log: cleanup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotree-wide: remove unneeded log prefixes
Christian Brauner [Sun, 1 Jul 2018 20:16:08 +0000 (22:16 +0200)]
tree-wide: remove unneeded log prefixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2445 from 2xsec/bugfix
Christian Brauner [Tue, 3 Jul 2018 09:44:15 +0000 (11:44 +0200)]
Merge pull request #2445 from 2xsec/bugfix

tests: cleanup source codes.

5 years agotests: cleanup state_server.c
2xsec [Tue, 3 Jul 2018 09:27:11 +0000 (18:27 +0900)]
tests: cleanup state_server.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup startone.c
2xsec [Tue, 3 Jul 2018 09:26:40 +0000 (18:26 +0900)]
tests: cleanup startone.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup snapshot.c
2xsec [Tue, 3 Jul 2018 09:25:54 +0000 (18:25 +0900)]
tests: cleanup snapshot.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup shutdowntest.c
2xsec [Tue, 3 Jul 2018 09:25:02 +0000 (18:25 +0900)]
tests: cleanup shutdowntest.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup shortlived.c
2xsec [Tue, 3 Jul 2018 09:24:26 +0000 (18:24 +0900)]
tests: cleanup shortlived.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup saveconfig.c
2xsec [Tue, 3 Jul 2018 09:23:48 +0000 (18:23 +0900)]
tests: cleanup saveconfig.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup reboot.c
2xsec [Tue, 3 Jul 2018 09:23:12 +0000 (18:23 +0900)]
tests: cleanup reboot.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: clenaup may_control.c
2xsec [Tue, 3 Jul 2018 09:22:48 +0000 (18:22 +0900)]
tests: clenaup may_control.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup lxcpath.c
2xsec [Tue, 3 Jul 2018 09:22:27 +0000 (18:22 +0900)]
tests: cleanup lxcpath.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup lxc_raw_clone.c
2xsec [Tue, 3 Jul 2018 09:22:01 +0000 (18:22 +0900)]
tests: cleanup lxc_raw_clone.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup lxc-test-utils.c
2xsec [Tue, 3 Jul 2018 09:21:36 +0000 (18:21 +0900)]
tests: cleanup lxc-test-utils.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup locktests.c
2xsec [Tue, 3 Jul 2018 09:20:44 +0000 (18:20 +0900)]
tests: cleanup locktests.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup list.c
2xsec [Tue, 3 Jul 2018 09:19:50 +0000 (18:19 +0900)]
tests: cleanup list.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup getkeys.c
2xsec [Tue, 3 Jul 2018 09:18:47 +0000 (18:18 +0900)]
tests: cleanup getkeys.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup get_item.c
2xsec [Tue, 3 Jul 2018 09:18:17 +0000 (18:18 +0900)]
tests: cleanup get_item.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup device_add_remove.c
2xsec [Tue, 3 Jul 2018 09:17:03 +0000 (18:17 +0900)]
tests: cleanup device_add_remove.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup destroytest.c
2xsec [Tue, 3 Jul 2018 09:16:30 +0000 (18:16 +0900)]
tests: cleanup destroytest.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup criu_check_feature.c
2xsec [Tue, 3 Jul 2018 09:15:45 +0000 (18:15 +0900)]
tests: cleanup criu_check_feature.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup createtest.c
2xsec [Tue, 3 Jul 2018 09:14:52 +0000 (18:14 +0900)]
tests: cleanup createtest.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup containertests.c
2xsec [Tue, 3 Jul 2018 09:14:14 +0000 (18:14 +0900)]
tests: cleanup containertests.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup console.c
2xsec [Tue, 3 Jul 2018 09:13:21 +0000 (18:13 +0900)]
tests: cleanup console.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup config_jump_table.c
2xsec [Tue, 3 Jul 2018 09:12:31 +0000 (18:12 +0900)]
tests: cleanup config_jump_table.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup concurrent.c
2xsec [Tue, 3 Jul 2018 09:11:46 +0000 (18:11 +0900)]
tests: cleanup concurrent.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup clonetest.c
2xsec [Tue, 3 Jul 2018 09:10:55 +0000 (18:10 +0900)]
tests: cleanup clonetest.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotests: cleanup api_reboot.c
2xsec [Tue, 3 Jul 2018 09:09:32 +0000 (18:09 +0900)]
tests: cleanup api_reboot.c

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2444 from 2xsec/bugfix
Christian Brauner [Tue, 3 Jul 2018 08:52:15 +0000 (10:52 +0200)]
Merge pull request #2444 from 2xsec/bugfix

utils: move recursive_destroy() from cfgsng to utils.

5 years agosync: modify error string
2xsec [Tue, 3 Jul 2018 06:08:44 +0000 (15:08 +0900)]
sync: modify error string

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoutils: move recursive_destroy() from cfgsng to utils.
2xsec [Tue, 3 Jul 2018 05:44:24 +0000 (14:44 +0900)]
utils: move recursive_destroy() from cfgsng to utils.

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2441 from 2xsec/coverity
Christian Brauner [Mon, 2 Jul 2018 11:54:31 +0000 (13:54 +0200)]
Merge pull request #2441 from 2xsec/coverity

coverity: #1425816

5 years agocoverity: #1425816
2xsec [Mon, 2 Jul 2018 11:37:36 +0000 (20:37 +0900)]
coverity: #1425816

Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2440 from brauner/2018-06-30/console_fixes
Stéphane Graber [Mon, 2 Jul 2018 03:09:30 +0000 (23:09 -0400)]
Merge pull request #2440 from brauner/2018-06-30/console_fixes

terminal: security fixes

5 years agotests: remove duplicate file_exists() definition
Christian Brauner [Sat, 30 Jun 2018 14:03:31 +0000 (16:03 +0200)]
tests: remove duplicate file_exists() definition

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: do not make terminal raw
Christian Brauner [Sat, 30 Jun 2018 11:13:52 +0000 (13:13 +0200)]
attach: do not make terminal raw

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoCODING_STYLE: add section about using strlcat()
Christian Brauner [Sat, 30 Jun 2018 09:41:23 +0000 (11:41 +0200)]
CODING_STYLE: add section about using strlcat()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: delete terminal on error
Christian Brauner [Sat, 30 Jun 2018 11:03:33 +0000 (13:03 +0200)]
start: delete terminal on error

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoterminal: set FD_CLOEXEC on pty file descriptors
Christian Brauner [Sat, 30 Jun 2018 11:06:08 +0000 (13:06 +0200)]
terminal: set FD_CLOEXEC on pty file descriptors

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoutils: add fd_cloexec()
Christian Brauner [Sun, 1 Jul 2018 10:05:31 +0000 (12:05 +0200)]
utils: add fd_cloexec()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoterminal: safely retrieve path of slave device
Christian Brauner [Sat, 30 Jun 2018 09:15:36 +0000 (11:15 +0200)]
terminal: safely retrieve path of slave device

openpty() is a horrible function that uses strcpy() into the char *name
argument if name != NULL. We can't rely on the path being sane in all cases so
let's split out the name retrieval to ttyname_r().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: simplify lxc_setup_dev_console()
Christian Brauner [Sat, 30 Jun 2018 09:10:12 +0000 (11:10 +0200)]
conf: simplify lxc_setup_dev_console()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2437 from 2xsec/bugfix
Christian Brauner [Sun, 1 Jul 2018 17:37:56 +0000 (19:37 +0200)]
Merge pull request #2437 from 2xsec/bugfix

tools: share internal API symbols

5 years agotools: lxc-wait: remove the trailing .
2xsec [Sun, 1 Jul 2018 13:52:40 +0000 (22:52 +0900)]
tools: lxc-wait: remove the trailing .

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-top: fix coding style of strncmp
2xsec [Sun, 1 Jul 2018 13:51:59 +0000 (22:51 +0900)]
tools: lxc-top: fix coding style of strncmp

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-start: remove the trailing .
2xsec [Sun, 1 Jul 2018 13:50:51 +0000 (22:50 +0900)]
tools: lxc-start: remove the trailing .

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-snapshot: fix coding style of strncmp
2xsec [Sun, 1 Jul 2018 13:50:04 +0000 (22:50 +0900)]
tools: lxc-snapshot: fix coding style of strncmp

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-device: remove the trailing . & fix coding style of strncmp
2xsec [Sun, 1 Jul 2018 13:49:07 +0000 (22:49 +0900)]
tools: lxc-device: remove the trailing . & fix coding style of strncmp

Signed-off-by: 2xsec <dh48.jeong@samsung.com>