]>
git.proxmox.com Git - mirror_lxc.git/log
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>
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
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>
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>
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>
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
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>
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>
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
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>
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>
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>
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>
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>
Christian Brauner [Wed, 4 Jul 2018 08:15:54 +0000 (10:15 +0200)]
Merge pull request #2448 from 2xsec/bugfix
log: 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>
Christian Brauner [Mon, 2 Jul 2018 19:27:54 +0000 (21:27 +0200)]
log: cleanup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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>
Christian Brauner [Tue, 3 Jul 2018 09:44:15 +0000 (11:44 +0200)]
Merge pull request #2445 from 2xsec/bugfix
tests: cleanup source codes.
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>
2xsec [Tue, 3 Jul 2018 09:26:40 +0000 (18:26 +0900)]
tests: cleanup startone.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:25:54 +0000 (18:25 +0900)]
tests: cleanup snapshot.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:25:02 +0000 (18:25 +0900)]
tests: cleanup shutdowntest.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:24:26 +0000 (18:24 +0900)]
tests: cleanup shortlived.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:23:48 +0000 (18:23 +0900)]
tests: cleanup saveconfig.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:23:12 +0000 (18:23 +0900)]
tests: cleanup reboot.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
2xsec [Tue, 3 Jul 2018 09:22:27 +0000 (18:22 +0900)]
tests: cleanup lxcpath.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
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>
2xsec [Tue, 3 Jul 2018 09:20:44 +0000 (18:20 +0900)]
tests: cleanup locktests.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:19:50 +0000 (18:19 +0900)]
tests: cleanup list.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:18:47 +0000 (18:18 +0900)]
tests: cleanup getkeys.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
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>
2xsec [Tue, 3 Jul 2018 09:16:30 +0000 (18:16 +0900)]
tests: cleanup destroytest.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
2xsec [Tue, 3 Jul 2018 09:14:52 +0000 (18:14 +0900)]
tests: cleanup createtest.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:14:14 +0000 (18:14 +0900)]
tests: cleanup containertests.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:13:21 +0000 (18:13 +0900)]
tests: cleanup console.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
2xsec [Tue, 3 Jul 2018 09:11:46 +0000 (18:11 +0900)]
tests: cleanup concurrent.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Tue, 3 Jul 2018 09:10:55 +0000 (18:10 +0900)]
tests: cleanup clonetest.c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
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.
2xsec [Tue, 3 Jul 2018 06:08:44 +0000 (15:08 +0900)]
sync: modify error string
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
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>
Christian Brauner [Mon, 2 Jul 2018 11:54:31 +0000 (13:54 +0200)]
Merge pull request #2441 from 2xsec/coverity
coverity: #
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
2xsec [Sun, 1 Jul 2018 13:47:25 +0000 (22:47 +0900)]
tools: lxc-destroy: remove the trailing .
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Sun, 1 Jul 2018 13:46:19 +0000 (22:46 +0900)]
tools: lxc-create: remove the trailing . & fix coding style of strncmp
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Sun, 1 Jul 2018 13:42:27 +0000 (22:42 +0900)]
tools: lxc-copy: remove the trailing . & fix coding style of strncmp
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Sun, 1 Jul 2018 13:40:19 +0000 (22:40 +0900)]
tools: lxc-config: fix coding style of strncmp
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Sun, 1 Jul 2018 13:38:52 +0000 (22:38 +0900)]
tools: lxc-checkpoint: remove the trailing .
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Sun, 1 Jul 2018 13:37:00 +0000 (22:37 +0900)]
tools: lxc-autostart: remove the trailing . & fix coding style of strncmp
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 14:39:03 +0000 (23:39 +0900)]
tools: remote tool_list, tool_utils
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 14:28:44 +0000 (23:28 +0900)]
tools: arguments: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 14:24:58 +0000 (23:24 +0900)]
tools: lxc-monitor: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 13:33:45 +0000 (22:33 +0900)]
tools: lxc-create: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 13:11:55 +0000 (22:11 +0900)]
tools: lxc-snapshot: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 13:03:55 +0000 (22:03 +0900)]
tools: lxc-checkpoint: fix log name
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 13:00:46 +0000 (22:00 +0900)]
tools: lxc-checkpoint: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 12:48:12 +0000 (21:48 +0900)]
tools: lxc-unshare: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 12:12:22 +0000 (21:12 +0900)]
tools: lxc-top: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 07:26:33 +0000 (16:26 +0900)]
tools: lxc-copy: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 07:10:42 +0000 (16:10 +0900)]
tools: lxc-execute: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 06:23:43 +0000 (15:23 +0900)]
tools: lxc-device: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 06:05:11 +0000 (15:05 +0900)]
tools: lxc-destroy: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 05:54:07 +0000 (14:54 +0900)]
tools: lxc-console: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 05:48:34 +0000 (14:48 +0900)]
tools: lxc-config: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 05:41:19 +0000 (14:41 +0900)]
tools: lxc-ls: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 05:15:22 +0000 (14:15 +0900)]
tools: lxc-info: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 05:06:10 +0000 (14:06 +0900)]
utils: code cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Fri, 29 Jun 2018 04:20:16 +0000 (13:20 +0900)]
tools: lxc-autostart: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Stéphane Graber [Fri, 29 Jun 2018 16:28:58 +0000 (12:28 -0400)]
Merge pull request #2438 from brauner/2018-06-29/linux-v4.18
autodev: adapt to changes in Linux 4.18
Christian Brauner [Fri, 29 Jun 2018 11:58:52 +0000 (13:58 +0200)]
autodev: adapt to changes in Linux 4.18
Starting with commit
55956b59df33 ("vfs: Allow userns root to call mknod on owned filesystems.")
Linux will allow mknod() in user namespaces for userns root if CAP_MKNOD is
available.
However, these device nodes are useless since
static struct super_block *alloc_super(struct file_system_type *type, int flags,
struct user_namespace *user_ns)
{
/* <snip> */
if (s->s_user_ns != &init_user_ns)
s->s_iflags |= SB_I_NODEV;
/* <snip> */
}
will set the SB_I_NODEV flag on the filesystem. When a device node created in
non-init userns is open()ed the call chain will hit:
bool may_open_dev(const struct path *path)
{
return !(path->mnt->mnt_flags & MNT_NODEV) &&
!(path->mnt->mnt_sb->s_iflags & SB_I_NODEV);
}
which will cause an EPERM because the device node is located on an fs
owned by non-init-userns and thus doesn't grant access to device nodes due to
SB_I_NODEV.
The solution is straightforward. Unless you're real root you should bind-mount
device nodes.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2xsec [Thu, 28 Jun 2018 14:19:50 +0000 (23:19 +0900)]
tools: lxc-attach: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 14:13:01 +0000 (23:13 +0900)]
tools: lxc-cgroup: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 14:07:01 +0000 (23:07 +0900)]
tools: lxc-wait: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 14:03:55 +0000 (23:03 +0900)]
tools: lxc-unfreeze: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 14:00:03 +0000 (23:00 +0900)]
tools: lxc-freeze: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 13:54:27 +0000 (22:54 +0900)]
tools: lxc-stop: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 28 Jun 2018 13:49:38 +0000 (22:49 +0900)]
tools: lxc-start: share internal API symbols
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Christian Brauner [Wed, 27 Jun 2018 08:48:07 +0000 (10:48 +0200)]
Merge pull request #2434 from 2xsec/bugfix
tools: fix quiet option is not working
2xsec [Wed, 27 Jun 2018 08:09:58 +0000 (17:09 +0900)]
tools: cgroup, freeze, unfreeze, wait: change fprintf => lxc_error
Signed-off-by: 2xsec <dh48.jeong@samsung.com>