]>
git.ipfire.org Git - thirdparty/lxc.git/log
Christian Brauner [Fri, 16 Feb 2018 14:56:24 +0000 (15:56 +0100)]
tests: remove lxc-test-ubuntu
This is really taking a long time for not a lot of benefit.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 16 Feb 2018 14:24:19 +0000 (15:24 +0100)]
CODING_STYLE: add section for str{n}cmp()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 14 Feb 2018 23:28:42 +0000 (00:28 +0100)]
cgroups: use correct mask for chmod()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 14 Feb 2018 12:04:59 +0000 (13:04 +0100)]
CODING_STYLE: add CODING_STYLE.md
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 14 Feb 2018 12:04:48 +0000 (13:04 +0100)]
CONTRIBUTING: update
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 13 Feb 2018 20:00:46 +0000 (21:00 +0100)]
cgfsng: simplifications and fixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 10 Feb 2018 22:25:18 +0000 (23:25 +0100)]
lxclock: remove pthread_atfork_handlers
They shouldn't be needed anymore.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Yifeng Tan [Mon, 12 Feb 2018 12:01:32 +0000 (20:01 +0800)]
conf: support mount propagation
Closes #810.
Signed-off-by: Yifeng Tan <tanyifeng1@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
LiFeng [Mon, 12 Feb 2018 12:22:47 +0000 (07:22 -0500)]
Fix lxc-console hang
The variable 'descr' is mistakenly covered with 'descr_console'.
Signed-off-by: LiFeng <lifeng68@huawei.com>
LiFeng [Mon, 12 Feb 2018 14:45:22 +0000 (09:45 -0500)]
Modify .gitignore
add:
src/lxc/cmd/lxc-checkconfig
src/lxc/cmd/lxc-update-config
Signed-off-by: LiFeng <lifeng68@huawei.com>
Christian Brauner [Sat, 10 Feb 2018 11:54:31 +0000 (12:54 +0100)]
console: they are really not necessary
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Tycho Andersen [Fri, 9 Feb 2018 13:26:31 +0000 (13:26 +0000)]
fix userns helper error handling
In both of these cases if there is actually an error, we won't close the
pipe and the api call will hang. Instead, let's be sure to close the pipe
before waiting, so that it doesn't hang.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Christian Brauner [Thu, 8 Feb 2018 15:06:31 +0000 (16:06 +0100)]
coverity: #
1425971
Dereference after null check
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 8 Feb 2018 14:42:16 +0000 (15:42 +0100)]
coverity: #
1426734
Argument cannot be negative
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Thu, 8 Feb 2018 14:31:59 +0000 (15:31 +0100)]
coverity: #
1429139
Resource leak
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Serge Hallyn [Thu, 8 Feb 2018 19:04:23 +0000 (13:04 -0600)]
Restore most cases of am_guest_unpriv
The only cases where we really need to be privileged with respect
to the host is when we are trying to mknod, and in some cases
to do with a physical network device. This patch leaves the
detection of the network device cases as a TODO.
This should fix the currently broken case of starting a privileged
container with at least one veth nic, nested inside an unprivileged
container.
Cc: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
Serge Hallyn [Thu, 8 Feb 2018 18:06:39 +0000 (12:06 -0600)]
define am_guest_unpriv
Sometimes we want to know whether we are privileged wrt our
namespaces, and sometimes we want to know whether we are priv
wrt init_user_ns.
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
Christian Brauner [Thu, 8 Feb 2018 10:36:41 +0000 (11:36 +0100)]
cgfsng: add required remount flags
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
9566d6742852c527bf5af38af5cbb878dad75705
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Marcos Paulo de Souza [Wed, 7 Feb 2018 15:06:43 +0000 (13:06 -0200)]
lsm: fix missing @ in function documentation
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Marcos Paulo de Souza [Wed, 7 Feb 2018 14:51:38 +0000 (12:51 -0200)]
selinux: simplify check for default label
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Marcos Paulo de Souza [Thu, 8 Feb 2018 01:55:13 +0000 (23:55 -0200)]
cgroups: add check for lxc.cgroup.use
Closes #870.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Christian Brauner [Wed, 7 Feb 2018 10:39:19 +0000 (11:39 +0100)]
templates: CentOS fixes
Issues fixed:
- lxc-centos died about a missing /run directory
- lxc-centos complained about some config files it couldn't modify
- the new container got stuck at startup time for a minute
(literally), waiting for systemd-remount-fs startup script
Of course it still works for RHEL 6, CentOS 6 and 7 as well. I did not
verify earlier CentOS or RHEL releases.
Signed-off-by: Harald Dunkel <harald.dunkel@aixigo.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 7 Feb 2018 10:27:57 +0000 (11:27 +0100)]
cgfsng: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
LiFeng [Wed, 7 Feb 2018 16:39:59 +0000 (11:39 -0500)]
cgfsng: do MS_REMOUNT
Perform MS_REMOUNT on mounts with MS_RDONLY.
Signed-off-by: LiFeng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 7 Feb 2018 10:13:48 +0000 (11:13 +0100)]
attach: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
l00415420 [Wed, 7 Feb 2018 12:39:28 +0000 (07:39 -0500)]
attach: set the container's environment variables
Set the same environment variables that were used when starting the container
when attaching to the container.
Signed-off-by: LiFeng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 16:09:13 +0000 (17:09 +0100)]
cgroups: more consistent naming
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:45:04 +0000 (16:45 +0100)]
cgroups: handle limits on the unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:42:19 +0000 (16:42 +0100)]
cgroups: cgfsng_set: handle unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:41:53 +0000 (16:41 +0100)]
cgroups: cgfsng_get: handle unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:38:55 +0000 (16:38 +0100)]
cgroups: cgfsng_attach: handle unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:33:17 +0000 (16:33 +0100)]
cgroups: cgfsng_create: handle unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 31 Jan 2018 15:25:11 +0000 (16:25 +0100)]
cgroups: get controllers on the unified hierarchy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Tycho Andersen [Mon, 5 Feb 2018 14:19:25 +0000 (14:19 +0000)]
lxc.init: ignore SIGHUP
see comment for details.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Mon, 5 Feb 2018 14:17:48 +0000 (14:17 +0000)]
monitor: send SIGTERM to the container when SIGHUP is received
For the ->execute() case, we want to make sure the application dies when
SIGHUP is received. The next patch will ignore SIGHUP in the lxc monitor,
because tasks inside the container send SIGHUP to init to have it reload
its config sometimes, and we don't want to do that with init.lxc, since it
might actually kill the container if it forwards SIGHUP to the child and
the child can't handle it.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Mon, 5 Feb 2018 14:13:18 +0000 (14:13 +0000)]
lxc-init: use SIGKILL after alarm timeout
d76e3e1 inadvertently switched the alarm timeout from sigterm to sigkill.
We really want sigkill here, so let's bring it back.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Stéphane Graber [Thu, 1 Feb 2018 14:02:25 +0000 (15:02 +0100)]
debian: We must use iproute on wheezy
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Christian Brauner [Thu, 1 Feb 2018 12:14:36 +0000 (13:14 +0100)]
lsm: do not #ifdefine
Since we stopped linking against AppArmor we can now remove the conditional
compilation.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 27 Jan 2018 13:43:14 +0000 (14:43 +0100)]
tools: make "-n" optional
This lets users use the tools with "lxc-* -n <container-name>" or
"lxc-* <container-name>".
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Sat, 27 Jan 2018 05:33:07 +0000 (00:33 -0500)]
debian: Use iproute2 instead of iproute
The package has pretty much always been iproute2 with iproute being an
alias for it, the alias is now gone so we need to use iproute2.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Tycho Andersen [Fri, 26 Jan 2018 21:21:51 +0000 (21:21 +0000)]
better unprivileged detection
In particular, if we are already in a user namespace we are unprivileged,
and doing things like moving the physical nics back to the host netns won't
work. Let's do the same thing LXD does if euid == 0: inspect
/proc/self/uid_map and see what that says.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 26 Jan 2018 17:43:12 +0000 (17:43 +0000)]
better check for lock dir
Consider the case where we're running in a user namespace but in the host's
mount ns with the host's filesystem (something like
lxc-usernsexec ... lxc-execute ...), in this case, we'll be euid 0, but we
can't actually write to /run. Let's improve this locking check to make sure
we can actually write to /run before we decide to actually use it as our
locking dir.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
duguhaotian [Fri, 26 Jan 2018 13:07:58 +0000 (21:07 +0800)]
[cgfsng] show wrong errno
lxc_cgroup_set_data: h = get_hierarchy(controller);
if h is NULL, now errno is old, it donot set new one.
And then,
cgfsng_setup_limits:
if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) {
if (do_devices && (errno == EACCES ||
errno == EPERM)) {
WARN("Error setting %s to %s for %s",
cg->subsystem, cg->value,
d->name);
continue;
}
SYSERROR("Error setting %s to %s for
%s",
cg->subsystem, cg->value,
d->name);
goto out;
}
SYSERROR will show old errno, make me confused.
Signed-off-by: duguhaotian <duguhaotian@gmail.com>
Marcos Paulo de Souza [Tue, 23 Jan 2018 00:04:03 +0000 (22:04 -0200)]
network.c: Remove ip_forward_set and callers
The last user of ip_forward_set, lxc_ip_forward_on and
lxc_ip_forward_off was in 2009:
commit
92d385229be040cf034ac6efd9405b7bdfe06a3e
Author: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Thu Oct 22 15:33:40 2009 +0200
remove test directory
These functions are not called anymore.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Christian Brauner [Mon, 22 Jan 2018 11:14:21 +0000 (12:14 +0100)]
autotools: do not link against libapparmor
Since we write the label directly without going through the AppArmor API it
doesn't make sense to link against it.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 22 Jan 2018 11:02:44 +0000 (12:02 +0100)]
apparmor: do not call aa_change_profile()
We can simply write the label ourselves. There's no magic happening.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 22 Jan 2018 10:54:21 +0000 (11:54 +0100)]
lsm: add lsm_process_label_set_at()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 22 Jan 2018 09:54:38 +0000 (10:54 +0100)]
lsm: add lsm_process_label_fd_get()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 22 Jan 2018 09:48:56 +0000 (10:48 +0100)]
lsm: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
LiFeng [Mon, 22 Jan 2018 11:13:52 +0000 (06:13 -0500)]
Fix comments and add check in lxc_poll.
Add check whether handler->conf->console.path is 'none'
Signed-off-by: LiFeng <lifeng68@huawei.com>
LiFeng [Mon, 22 Jan 2018 12:48:21 +0000 (07:48 -0500)]
Modify .gitignore
Add:
src/tests/lxc-test-api-reboot
src/tests/lxc-test-criu-check-feature
src/tests/lxc-test-raw-clone
src/tests/lxc-test-share-ns
src/tests/lxc-test-state-server
Signed-off-by: LiFeng <lifeng68@huawei.com>
Christian Brauner [Sun, 21 Jan 2018 12:55:42 +0000 (13:55 +0100)]
start: fix mainloop cleanup goto statements
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 20:46:31 +0000 (21:46 +0100)]
coverity: #
1426694
remove logically dead code
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 20:44:50 +0000 (21:44 +0100)]
coverity: #
1426734
do not call close on bad fd
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 8 Jan 2018 17:25:56 +0000 (18:25 +0100)]
coverity: #
1427190
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 8 Jan 2018 17:24:41 +0000 (18:24 +0100)]
coverity: #
1427191
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 20:35:35 +0000 (21:35 +0100)]
coverity: #
1427638
avoid (however unlikely) double free
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 20:30:17 +0000 (21:30 +0100)]
coverity: #
1427639
remove logically dead code
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 20:26:33 +0000 (21:26 +0100)]
coverity: #
1427668
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Tycho Andersen [Wed, 20 Dec 2017 17:52:38 +0000 (17:52 +0000)]
unlink lxc-init
It's sort of an implementation detail that this exists at all, and we
should probably not pollute the container's mount tables or FS with this.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
LiFeng [Thu, 18 Jan 2018 22:26:11 +0000 (17:26 -0500)]
Create console when the rootfs is NULL
Signed-off-by: LiFeng <lifeng68@huawei.com>
Christian Brauner [Sat, 20 Jan 2018 13:01:19 +0000 (14:01 +0100)]
tools: fix android
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 11:52:08 +0000 (12:52 +0100)]
cgfsng: reduce delta
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 11:51:04 +0000 (12:51 +0100)]
Revert commit "bla" with bad commit message
This reverts commit
04c141a4ed93e5daf20b90b3da80314cb501b1a9 .
Christian Brauner [Sat, 20 Jan 2018 11:48:06 +0000 (12:48 +0100)]
bla
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 11:40:45 +0000 (12:40 +0100)]
cgroups: reduce delta
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 11:12:05 +0000 (12:12 +0100)]
attach: reduce delta
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 20 Jan 2018 11:06:14 +0000 (12:06 +0100)]
attach_options: reduce delta
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 19 Jan 2018 15:53:24 +0000 (16:53 +0100)]
test: fix console tests
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 19 Jan 2018 14:36:14 +0000 (15:36 +0100)]
console: cleanup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Tycho Andersen [Fri, 19 Jan 2018 04:23:48 +0000 (04:23 +0000)]
set exit status to 1 in the unknown si_code case
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 03:31:33 +0000 (03:31 +0000)]
lxc-execute: actually exit with the status of the spawned task
Now that we have things propagated through init and liblxc correctly, at
least in non-daemon mode, we can exit with the actual exit status of the
task, instead of always succeeding, which is not so helpful.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 03:29:05 +0000 (03:29 +0000)]
start: don't return false when the container's init exits nonzero
This seems slightly counter-intuitive, but IMO it's what we want.
Basically, ->start() should succeed if the container is spawned correctly
(similar to how golang's exec.Cmd.Start() returns nil if the thing spawns
correctly), and users can check error_num (i.e. golang's exec.Cmd.Wait())
to see how it exited.
This preserves previous behavior, which basically was that start was always
successful if the thing actually launched. Since we never kept track of
exit codes, this would always succeed too. Now that we do, it doesn't, and
this change is required.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 03:24:59 +0000 (03:24 +0000)]
remember the exit code from the init process
error_num seems to be trying to remember the exit code of the init process,
except that nothing actually keeps track of it anywhere. So, let's add a
field to the handler, so that we can keep track of the process' exit
status, and the propagate it to error_num in struct lxc_container so that
people can use it.
Note that this is a slight behavior change, essentially instead of making
error_num always == the return code from start, now it contains slightly
more useful information (the actual exit status). But, there is only one
internal user of error_num which I'll fix in later in the series, so IMO
this is ok.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 03:21:10 +0000 (03:21 +0000)]
lxc.init: correctly exit with the app's error code
Based on the comments in the code (and the have_status flag), the intent
here (and IMO, the desired behavior) should be for init.lxc to propagate
the actual exit code from the real application process up through.
Otherwise, it is swallowed and nobody can access it.
The bug being fixed here is that ret held the correct exit code, but when
it went around the loop again (to wait for other children) ret is
clobbered. Let's save the desired exit status somewhere else, so it can't
get clobbered, and we propagate things correctly.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 03:20:08 +0000 (03:20 +0000)]
fix lxc_error_set_and_log to match the docs
The documentation for this function says if the task was killed by a
signal, the return code will be 128+n, where n is the signal number. Let's
make that actually true.
(We'll use this behavior in later patches.)
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Fri, 19 Jan 2018 00:50:39 +0000 (00:50 +0000)]
start: don't log stop/continue for non-init processes
This non-init forwarding check should really be before all the log messages
about "init continued" or "init stopped", since they will otherwise lie
about some process that wasn't init being stopped or continued.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Christian Brauner [Wed, 17 Jan 2018 19:46:04 +0000 (20:46 +0100)]
commands: add LXC_CMD_SERVE_STATE_CLIENTS
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Jan 2018 19:09:13 +0000 (20:09 +0100)]
freezer: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Jan 2018 14:22:36 +0000 (15:22 +0100)]
lxccontainer: restore blocking wait()
Closes #2027.
Closes lxc/go-lxc#98.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Jan 2018 11:21:09 +0000 (12:21 +0100)]
utils: check suffix length
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Jan 2018 10:50:54 +0000 (11:50 +0100)]
test: log error on failure
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 17 Jan 2018 10:19:05 +0000 (11:19 +0100)]
utils: do not rely on unitialized variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Kaarle Ritvanen [Tue, 16 Jan 2018 13:53:04 +0000 (15:53 +0200)]
lxc-alpine: allow retaining sys_ptrace per container
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Christian Brauner [Sun, 31 Dec 2017 00:58:16 +0000 (01:58 +0100)]
console: set SFD_CLOEXEC on signal fd
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 31 Dec 2017 00:48:01 +0000 (01:48 +0100)]
start: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 25 Dec 2017 00:52:33 +0000 (01:52 +0100)]
tools: honor --console and --console-log
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 24 Dec 2017 18:24:35 +0000 (19:24 +0100)]
attach: minor tweaks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 24 Dec 2017 18:13:54 +0000 (19:13 +0100)]
console: add lxc_pty_map_ids()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 23 Dec 2017 12:25:44 +0000 (13:25 +0100)]
console: adapt lxc_console_mainloop_add()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 23 Dec 2017 11:39:52 +0000 (12:39 +0100)]
attach: cleanup attach_child_main()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 23 Dec 2017 11:19:51 +0000 (12:19 +0100)]
console: add some pty helpers
- int lxc_make_controlling_pty()
- int lxc_login_pty()
- void lxc_pty_conf_free()
- void lxc_pty_info_init()
- void lxc_pty_init()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 23 Dec 2017 11:03:32 +0000 (12:03 +0100)]
start: non-functional changes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 23 Dec 2017 10:59:36 +0000 (11:59 +0100)]
console: move pty creation to separate function
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 9 Jan 2018 10:20:44 +0000 (11:20 +0100)]
confile: improve log messages
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Tycho Andersen [Tue, 9 Jan 2018 00:07:50 +0000 (00:07 +0000)]
add some idmap parsing error messages
otherwise, we just get a return value of false from setting config failure,
with no indication as to what actually failed in the log.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Tycho Andersen [Mon, 8 Jan 2018 16:20:24 +0000 (16:20 +0000)]
fix up lxc-usernsexec's exit status
* exit(1) when there is an option parsing error
* exit(0) when the user explicitly asks for help
* exit(1) when the user specifies an invalid option
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
LiFeng [Mon, 8 Jan 2018 19:26:00 +0000 (14:26 -0500)]
Add return check for 'lxc_cmd_get_name'
If 'lxc_cmd_get_name' failed and return with NULL, this would cause a segment fault.
Signed-off-by: LiFeng <lifeng68@huawei.com>
Stéphane Graber [Fri, 5 Jan 2018 20:20:55 +0000 (15:20 -0500)]
Include -devel suffix in version string
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Stéphane Graber [Fri, 5 Jan 2018 20:19:30 +0000 (15:19 -0500)]
Fix broken indentation
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>