]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
7 years agolxc_execute: properly figure out number of needed arguments
Serge Hallyn [Tue, 5 Dec 2017 04:30:26 +0000 (22:30 -0600)] 
lxc_execute: properly figure out number of needed arguments

The lxc_log args have noghing to do with lxc.rootfs.path, and
we need room for a NULL at end of arguments.

How this bug was hidden for so long I don't know - I can only
trigger it on certain systems under certain conditions, but it's
definately wrong as is.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
7 years agotest: reenable Coverity integration
Christian Brauner [Mon, 4 Dec 2017 22:41:45 +0000 (23:41 +0100)] 
test: reenable Coverity integration

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoUse AX_PTHREAD config script to detect pthread api
Marcos Paulo de Souza [Sun, 26 Nov 2017 18:45:22 +0000 (16:45 -0200)] 
Use AX_PTHREAD config script to detect pthread api

Closes: #84
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
7 years agolxc-test-unpriv: check user existence before removing it
Po-Hsu Lin [Wed, 22 Nov 2017 08:11:34 +0000 (03:11 -0500)] 
lxc-test-unpriv: check user existence before removing it

Check the test user (lxcunpriv) before calling deluser command,
otherwise it will print unnecessary error message:
/usr/sbin/deluser: The user 'lxcunpriv' does not exist.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
7 years agostart: dup std{in,out,err} to pty slave
Li Feng [Mon, 10 Jul 2017 09:19:52 +0000 (17:19 +0800)] 
start: dup std{in,out,err} to pty slave

In the case the container has a console with a valid slave pty file descriptor
we duplicate std{in,out,err} to the slave file descriptor so console logging
works correctly.
Also, we should become session leader.

Closes #1646.
Closes #1951.

Signed-off-by: Li Feng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoFix memory leak of 'lxc_tty_state'
Li Feng [Wed, 21 Jun 2017 05:38:06 +0000 (13:38 +0800)] 
Fix memory leak of 'lxc_tty_state'

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoDO NOT add the handles of adjust winsize when the 'stdin' is not a tty
Li Feng [Sat, 20 May 2017 09:40:36 +0000 (17:40 +0800)] 
DO NOT add the handles of adjust winsize when the 'stdin' is not a tty

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoconsole: clean tty state + return 0 on peer exit
LiFeng [Tue, 5 Sep 2017 15:16:50 +0000 (23:16 +0800)] 
console: clean tty state + return 0 on peer exit

In the past, if the console client exited, lxc_console_cb_con return 1. And
the lxc_poll will exit, the process will wait at waitpid. At this moment, the
process could not handle any command (For example get the container state
LXC_CMD_GET_STATE or stop the container LXC_CMD_STOP.).

I think we should clean the tty_state and return 0 in this case. So, we can use
the lxc-console to connect the console of the container. And we will not exit
the function lxc_polland we can handle the commands by lxc_cmd_process

Reproducer prior to this commit:
- open a new terminal, get the tty device name by command tty /dev/pts/6
- set lxc.console.path = /dev/pts/6
- start the container and the ouptut will print to /dev/pts/6
- close /dev/pts/6
- try an operation e.g. getting state with lxc-ls and lxc-ls will hang

Closes #1787.

Signed-off-by: LiFeng <lifeng68@huawei.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: backport set_stdfds()
Christian Brauner [Wed, 29 Nov 2017 02:46:12 +0000 (03:46 +0100)] 
utils: backport set_stdfds()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconsole: Move welcome message down a bit
Stéphane Graber [Thu, 16 Nov 2017 22:13:27 +0000 (17:13 -0500)] 
console: Move welcome message down a bit

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoRevert "start: close data socket in parent"
Stéphane Graber [Thu, 16 Nov 2017 21:57:31 +0000 (16:57 -0500)] 
Revert "start: close data socket in parent"

This reverts commit 37d5831e32e7f1d0395fdd9e19120a7eca66caff.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoconsole: use correct escape sequence check
Christian Brauner [Sat, 11 Nov 2017 22:05:33 +0000 (23:05 +0100)] 
console: use correct escape sequence check

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconsole: report detach message on demand
Christian Brauner [Fri, 10 Nov 2017 18:51:57 +0000 (19:51 +0100)] 
console: report detach message on demand

When users pass -1 there's there won't be an escape sequence to exit the
console so no need to print a misleading info message about how to detach.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc-debian: don't hardcode valid releases
Antonio Terceiro [Sat, 28 Oct 2017 11:20:35 +0000 (09:20 -0200)] 
lxc-debian: don't hardcode valid releases

This avoids the dance of updating the list of valid releases every time
Debian makes a new release.

It also fixes the following bug: even though lxc-debian will default to
creating containers of the latest stable by querying the archive, it
won't allow you to explicitly request `stable` because the current list
of valid releases don't include it.

Last, but not least, avoid hitting the mirror in the case the desired
release is one of the ones we know will always be there, i.e. stable,
testing, sid, and unstable.

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
7 years agolxc-debian: don't write C.* locales to /etc/locale.gen
Antonio Terceiro [Fri, 27 Oct 2017 19:13:54 +0000 (17:13 -0200)] 
lxc-debian: don't write C.* locales to /etc/locale.gen

Doing that confuses locale generation. lxc-ubuntu does the same check

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
7 years agostart: close data socket in parent
Christian Brauner [Sun, 29 Oct 2017 16:03:57 +0000 (17:03 +0100)] 
start: close data socket in parent

Brings the number of open fds in the monitor process for a standard container
without ttys down to 17.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc-start: remove unnecessary checks
Christian Brauner [Sat, 28 Oct 2017 13:30:04 +0000 (15:30 +0200)] 
lxc-start: remove unnecessary checks

The console struct is internal and liblxc takes care of creating paths.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc-debian: allow creating `testing` and `unstable`
Antonio Terceiro [Thu, 26 Oct 2017 22:42:49 +0000 (20:42 -0200)] 
lxc-debian: allow creating `testing` and `unstable`

Being able to create `testing` containers, regardless of what's the name
of the next stable, is useful in several contexts, included but not
limited to testing purposes. i.e. one won't need to explicitly switch to
`bullseye` once `buster` is released to be able to continue tracking
`testing`. While we are at it, let's also enable `unstable`, which is
exactly the same as `sid`, but there is no reason for not being able to.

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
7 years agochange version to 1.0.11 in configure.ac lxc-1.0.11
Stéphane Graber [Thu, 19 Oct 2017 17:14:17 +0000 (13:14 -0400)] 
change version to 1.0.11 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoChange locale "en-US.UTF-8" to "en_US.UTF-8"
Fridtjof Mund [Tue, 17 Oct 2017 10:38:09 +0000 (12:38 +0200)] 
Change locale "en-US.UTF-8" to "en_US.UTF-8"

This template would always add "en-US.UTF-8" to the end of the container's locale.gen, which in turn confused locale-gen.

Signed-off-by: Fridtjof Mund <fridtjofmund@gmail.com>
7 years agodrop useless apparmor denies
Tycho Andersen [Tue, 3 Oct 2017 05:00:21 +0000 (23:00 -0600)] 
drop useless apparmor denies

mem and kmem are really in /dev, so this does us no good.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
7 years agodoc: fix regex-typo in Japanese and Korean lxc-monitor(1)
KATOH Yasufumi [Tue, 19 Sep 2017 15:51:03 +0000 (00:51 +0900)] 
doc: fix regex-typo in Japanese and Korean lxc-monitor(1)

Update for commit e3dd06ef41b63d0ee362fea74a3f2d798dbfe929

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agoutils: fix lxc_popen()/lxc_pclose()
Christian Brauner [Wed, 13 Sep 2017 15:07:43 +0000 (17:07 +0200)] 
utils: fix lxc_popen()/lxc_pclose()

- rework and fix pipe fd leak

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: duplicate stderr as well in lxc_popen()
Christian Brauner [Wed, 13 Sep 2017 03:25:22 +0000 (05:25 +0200)] 
utils: duplicate stderr as well in lxc_popen()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agofix regex-typo in lxc-monitor.sgml.in
Christian von Roques [Tue, 12 Sep 2017 10:31:23 +0000 (12:31 +0200)] 
fix regex-typo in lxc-monitor.sgml.in

To match names beginning with the letters "f" or "b" one can use
the regular expression "[fb].*" or "(f|b).*", but not "[f|b].*",
which would match strings beginning with "f", "|", or "b".

Signed-off-by: Christian von Roques <roques@z12.ch>
7 years agoutils: lxc_popen() remove dead assignments
Christian Brauner [Sun, 10 Sep 2017 06:09:52 +0000 (08:09 +0200)] 
utils: lxc_popen() remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotests: avoid NULL pointer dereference
Christian Brauner [Sun, 10 Sep 2017 06:09:05 +0000 (08:09 +0200)] 
tests: avoid NULL pointer dereference

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc_usernsexec: remove dead assignments
Christian Brauner [Sun, 10 Sep 2017 06:03:06 +0000 (08:03 +0200)] 
lxc_usernsexec: remove dead assignments

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconsole: non-functional change
Christian Brauner [Wed, 30 Aug 2017 14:37:22 +0000 (16:37 +0200)] 
console: non-functional change

Remove executable bit.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotemplates/ubuntu: conditionally move upstart ssh job, as it is now optional.
Dimitri John Ledkov [Tue, 29 Aug 2017 14:11:55 +0000 (15:11 +0100)] 
templates/ubuntu: conditionally move upstart ssh job, as it is now optional.

Mimic the code from the debian template.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
7 years agortnl: non-functional changes
Christian Brauner [Fri, 25 Aug 2017 05:07:43 +0000 (07:07 +0200)] 
rtnl: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoUse deb.debian.org as the default Debian mirror
Salvatore Bonaccorso [Thu, 24 Aug 2017 07:24:29 +0000 (09:24 +0200)] 
Use deb.debian.org as the default Debian mirror

The httpredir.debian.org service has been discontinued in favour of
deb.debian.org and httpredir.debian.org now redirects to deb.debian.org.

https://lists.debian.org/debian-mirrors/2017/02/msg00000.html
https://wiki.debian.org/DebianGeoMirror#httpredir.debian.org_.2F_http.debian.net

Cf. https://bugs.debian.org/872719

Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
7 years agotools: use "which"
Christian Brauner [Mon, 21 Aug 2017 15:33:30 +0000 (17:33 +0200)] 
tools: use "which"

Somehow "type" doesn't really work.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoFix mem leak with realpath
Shukui Yang [Fri, 11 Aug 2017 09:12:24 +0000 (17:12 +0800)] 
Fix mem leak with realpath

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
7 years agodebian: Add buster as a valid release
Stéphane Graber [Mon, 7 Aug 2017 21:49:40 +0000 (17:49 -0400)] 
debian: Add buster as a valid release

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agotravis: fix builds
Christian Brauner [Wed, 2 Aug 2017 16:41:57 +0000 (18:41 +0200)] 
travis: fix builds

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotemplates/opensuse: getty.target.wants does not always exists
Thomas Lamprecht [Tue, 1 Aug 2017 06:03:07 +0000 (08:03 +0200)] 
templates/opensuse: getty.target.wants does not always exists

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 years agolxccontainer: use snprintf()
Christian Brauner [Sat, 15 Jul 2017 13:34:21 +0000 (15:34 +0200)] 
lxccontainer: use snprintf()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoUse "rsync -SHaAX" to copy the cached rootfs into place
Harald Dunkel [Fri, 28 Jul 2017 18:08:02 +0000 (13:08 -0500)] 
Use "rsync -SHaAX" to copy the cached rootfs into place

(updated by Serge to also handle hte new lxc-fedora{-legacy{.in
templates)

Signed-off-by: Harald Dunkel <harri@afaics.de>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
7 years agocommonds: fix typo
Long Wang [Sun, 9 Jul 2017 00:10:34 +0000 (08:10 +0800)] 
commonds: fix typo

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agocommands: add missing translation
Christian Brauner [Mon, 3 Jul 2017 21:37:31 +0000 (23:37 +0200)] 
commands: add missing translation

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: close parent end in child process after fork
Long Wang [Sat, 8 Jul 2017 05:27:16 +0000 (13:27 +0800)] 
utils: close parent end in child process after fork

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agostate: remove lxc_rmstate declaration
Long Wang [Sat, 8 Jul 2017 02:40:41 +0000 (10:40 +0800)] 
state: remove lxc_rmstate declaration

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agoaf_unix: remove unlink operation
Long Wang [Sat, 8 Jul 2017 02:29:57 +0000 (10:29 +0800)] 
af_unix: remove unlink operation

It is not necessary to unlink the abstract socket pathname when
we have finished using the socket. The abstract name is automatically
removed when the socket is closed.

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agoAllow containers to start in AppArmor namespaces
Frédéric Dalleau [Fri, 7 Jul 2017 09:26:45 +0000 (11:26 +0200)] 
Allow containers to start in AppArmor namespaces

This patch allows users to start containers in AppArmor namespaces.
Users can define their own profiles for their containers, but
lxc-start must be allowed to change to a namespace.

A container configuration file can wrap a container in an AppArmor
profile using lxc.aa_profile.

A process in an AppArmor namespace is restricted to view
or manage only the profiles belonging to this namespace, as if no
other profiles existed. A namespace can be created as follow:
sudo mkdir /sys/kernel/security/apparmor/policy/namespaces/$NAMESPACE

AppArmor can stack profiles so that the contained process is bound
by the intersection of all profiles of the stack. This is achieved
using the '//&' operator as follow:

lxc.aa_profile = $PROFILE//&:$NAMESPACE://unconfined

In this case, even the guest process appears unconfined in the
namespace, it is still confined by $PROFILE.

A guest allowed to access "/sys/kernel/security/apparmor/** rwklix,"
will be able to manage its own profile set, while still being
enclosed in the topmost profile $PROFILE:

Different guests can be assigned the same namespace or different
namespaces. In the first case, they will share their profiles.
In the second case, they will have distinct sets of profiles.

This is validated on privileged containers.

Signed-off-by: Frédéric Dalleau <frederic.dalleau@collabora.com>
7 years agotests: remove temp lxcpath for attach testcase
Long Wang [Wed, 5 Jul 2017 07:39:02 +0000 (15:39 +0800)] 
tests: remove temp lxcpath for attach testcase

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agolxc-init: add comment for exclude 32 and 33 signals
Long Wang [Wed, 5 Jul 2017 02:53:02 +0000 (10:53 +0800)] 
lxc-init: add comment for exclude 32 and 33 signals

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agoREADME: update
Christian Brauner [Mon, 3 Jul 2017 22:15:05 +0000 (00:15 +0200)] 
README: update

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoREADME: add CII Best Practices badge to README
Christian Brauner [Mon, 3 Jul 2017 18:39:59 +0000 (20:39 +0200)] 
README: add CII Best Practices badge to README

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxclock: non-functional changes
Long Wang [Mon, 3 Jul 2017 07:43:34 +0000 (15:43 +0800)] 
lxclock: non-functional changes

This patch mainly updates comments based on the current code.

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agolxclock: return the right error when open lock file failed
Long Wang [Mon, 3 Jul 2017 07:41:25 +0000 (15:41 +0800)] 
lxclock: return the right error when open lock file failed

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agofix some cppcheck warnings
0x0916 [Sun, 2 Jul 2017 11:12:05 +0000 (19:12 +0800)] 
fix some cppcheck warnings

use cppcheck tools `cppcheck --enable=warning  .` on lxc source directory.

This patch fix the following warnning

```
[src/lxc/cgroups/cgfs.c:794]: (warning) %ld in format string (no. 3) requires 'long' but the argument type is 'unsigned long'.
[src/lxc/confile.c:4441]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile.c:4502]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:921]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:938]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/lxclock.c:63]: (warning) %zd in format string (no. 1) requires 'ssize_t' but the argument type is 'size_t {aka unsigned long}'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:123]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:127]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:130]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:217]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:221]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:224]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
```

Signed-off-by: Long Wang <w@laoqinren.net>
7 years agoconfile: free netdev->downscript
0x0916 [Tue, 27 Jun 2017 14:12:38 +0000 (22:12 +0800)] 
confile: free netdev->downscript

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoremove the `__func__` macro
0x0916 [Mon, 26 Jun 2017 09:55:12 +0000 (17:55 +0800)] 
remove the `__func__` macro

Our logging function will always spew out the function name.

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoAPI doc: update note for get_config_item
0x0916 [Mon, 26 Jun 2017 09:28:47 +0000 (17:28 +0800)] 
API doc: update note for get_config_item

Fix issue: https://github.com/lxc/lxc/issues/505

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agouse altarch mirror for CentOS on arches other than i386 and x86_64
Evgeni Golov [Sat, 24 Jun 2017 16:53:05 +0000 (18:53 +0200)] 
use altarch mirror for CentOS on arches other than i386 and x86_64

CentOS only has i386 and x86_64 listed in mirrorlist.centos.org,
use http://mirror.centos.org/altarch/ for all other arches instead

See: https://bugs.centos.org/view.php?id=11250

Signed-off-by: Evgeni Golov <evgeni@debian.org>
7 years agotemplates/debian: add aarch64 → arm64 mapping
Evgeni Golov [Sat, 24 Jun 2017 15:24:49 +0000 (17:24 +0200)] 
templates/debian: add aarch64 → arm64 mapping

uname -m reports aarch64, but Debian calls the arch arm64

Signed-off-by: Evgeni Golov <evgeni@debian.org>
7 years agoUse strerror(errno) instead of %m
0x0916 [Fri, 23 Jun 2017 11:41:34 +0000 (19:41 +0800)] 
Use strerror(errno) instead of %m

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoMerge pull request #1749 from brauner/2017-08-15/stable_1_0_cherry_picks
Stéphane Graber [Tue, 15 Aug 2017 22:55:51 +0000 (18:55 -0400)] 
Merge pull request #1749 from brauner/2017-08-15/stable_1_0_cherry_picks

bdev: enable building with gcc7

7 years agobdev: enable building with gcc7 1749/head
Christian Brauner [Tue, 15 Aug 2017 22:34:23 +0000 (00:34 +0200)] 
bdev: enable building with gcc7

We shouldn't ignore this anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoadding warning for mtu ignoring
Shane Chen [Thu, 1 Jun 2017 05:36:41 +0000 (13:36 +0800)] 
adding warning for mtu ignoring

Signed-off-by: Shane Chen <ss1ha3tw@gmail.com>
7 years agoconf: improve write_id_mapping()
Christian Brauner [Sat, 27 May 2017 06:16:01 +0000 (08:16 +0200)] 
conf: improve write_id_mapping()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconf: non-functional changes
Christian Brauner [Sun, 28 May 2017 22:18:37 +0000 (00:18 +0200)] 
conf: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_utsname()
Christian Brauner [Mon, 29 May 2017 13:04:40 +0000 (15:04 +0200)] 
confile: config_utsname()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_stopsignal()
Christian Brauner [Mon, 29 May 2017 13:01:28 +0000 (15:01 +0200)] 
confile: config_stopsignal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_haltsignal()
Christian Brauner [Mon, 29 May 2017 12:59:21 +0000 (14:59 +0200)] 
confile: config_haltsignal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_haltsignal()
Christian Brauner [Mon, 29 May 2017 12:58:24 +0000 (14:58 +0200)] 
confile: config_haltsignal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_start()
Christian Brauner [Mon, 29 May 2017 12:53:58 +0000 (14:53 +0200)] 
confile: config_start()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_cap_drop()
Christian Brauner [Mon, 29 May 2017 12:41:02 +0000 (14:41 +0200)] 
confile: config_cap_drop()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_cap_keep()
Christian Brauner [Mon, 29 May 2017 12:40:47 +0000 (14:40 +0200)] 
confile: config_cap_keep()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_mount()
Christian Brauner [Mon, 29 May 2017 12:40:32 +0000 (14:40 +0200)] 
confile: config_mount()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_mount_auto()
Christian Brauner [Mon, 29 May 2017 12:40:18 +0000 (14:40 +0200)] 
confile: config_mount_auto()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_fstab()
Christian Brauner [Mon, 29 May 2017 12:39:56 +0000 (14:39 +0200)] 
confile: config_fstab()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_idmap()
Christian Brauner [Mon, 29 May 2017 12:39:33 +0000 (14:39 +0200)] 
confile: config_idmap()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_cgroup()
Christian Brauner [Mon, 29 May 2017 12:38:50 +0000 (14:38 +0200)] 
confile: config_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_loglevel()
Christian Brauner [Mon, 29 May 2017 12:38:26 +0000 (14:38 +0200)] 
confile: config_loglevel()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_group()
Christian Brauner [Mon, 29 May 2017 12:37:42 +0000 (14:37 +0200)] 
confile: config_group()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_hook()
Christian Brauner [Mon, 29 May 2017 12:37:18 +0000 (14:37 +0200)] 
confile: config_hook()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_ipv6_gateway()
Christian Brauner [Mon, 29 May 2017 12:36:36 +0000 (14:36 +0200)] 
confile: config_network_ipv6_gateway()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_ipv6()
Christian Brauner [Mon, 29 May 2017 12:36:12 +0000 (14:36 +0200)] 
confile: config_network_ipv6()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_ipv4_gateway()
Christian Brauner [Mon, 29 May 2017 12:35:55 +0000 (14:35 +0200)] 
confile: config_network_ipv4_gateway()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_ipv4()
Christian Brauner [Mon, 29 May 2017 12:35:13 +0000 (14:35 +0200)] 
confile: config_network_ipv4()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_hwaddr()
Christian Brauner [Mon, 29 May 2017 12:34:34 +0000 (14:34 +0200)] 
confile: config_network_hwaddr()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_network_type()
Christian Brauner [Mon, 29 May 2017 12:32:37 +0000 (14:32 +0200)] 
confile: config_network_type()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: config_string_item()
Christian Brauner [Mon, 29 May 2017 12:30:04 +0000 (14:30 +0200)] 
confile: config_string_item()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add config_value_empty()
Christian Brauner [Mon, 29 May 2017 12:28:34 +0000 (14:28 +0200)] 
confile: add config_value_empty()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoREADME: reword id mapping restrictions when unpriv
Christian Brauner [Mon, 29 May 2017 04:02:24 +0000 (06:02 +0200)] 
README: reword id mapping restrictions when unpriv

Suggested-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agorepo: add new README
Christian Brauner [Sat, 27 May 2017 01:53:59 +0000 (03:53 +0200)] 
repo: add new README

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoFix the bug of 'ts->stdoutfd' did not fill with parameters 'stdoutfd'
Li Feng [Fri, 19 May 2017 14:40:07 +0000 (22:40 +0800)] 
Fix the bug of 'ts->stdoutfd' did not fill with parameters 'stdoutfd'

Signed-off-by: Li Feng <lifeng68@huawei.com>
7 years agoAdd cronie to the pkg list
mgariepy [Wed, 17 May 2017 19:03:20 +0000 (15:03 -0400)] 
Add cronie to the pkg list

Add cronie to have crond running in the containers.

Signed-off-by: Marc Gariepy <gariepy.marc@gmail.com>
7 years agoseccomp: print action name in log
0x0916 [Mon, 15 May 2017 10:05:09 +0000 (18:05 +0800)] 
seccomp: print action name in log

This patch add function `get_action_name`, so we can print action name
in the log file. for example:

```
lxc-start ubuntu 20170515095416.561 INFO     lxc_seccomp - seccomp.c:parse_config_v2:613 - Adding compat rule for reject_force_umount action 0(kill).
lxc-start ubuntu 20170515095416.562 INFO     lxc_seccomp - seccomp.c:parse_config_v2:613 - Adding compat rule for kexec_load action 327681(errno).
```

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoseccomp: update comment for function `parse_config`
0x0916 [Mon, 15 May 2017 10:04:27 +0000 (18:04 +0800)] 
seccomp: update comment for function `parse_config`

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoseccomp: s/n-new-privs/no-new-privs/g
0x0916 [Mon, 15 May 2017 10:03:41 +0000 (18:03 +0800)] 
seccomp: s/n-new-privs/no-new-privs/g

Signed-off-by: 0x0916 <w@laoqinren.net>
7 years agoconf: fix build without libcap
Dima Krasner [Sun, 14 May 2017 09:24:59 +0000 (12:24 +0300)] 
conf: fix build without libcap

Signed-off-by: Dima Krasner <samdima@securingsam.com>
8 years agochange version to 1.0.10 in configure.ac lxc-1.0.10
Stéphane Graber [Thu, 11 May 2017 17:02:58 +0000 (13:02 -0400)] 
change version to 1.0.10 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
8 years agolxccontainer: avoid NULL pointer dereference
Christian Brauner [Sat, 6 May 2017 21:38:22 +0000 (23:38 +0200)] 
lxccontainer: avoid NULL pointer dereference

In case the lxc command socket is hashed and the socket was created for a
different path than the one we're currently querying
lxc_cmd_get_{lxcpath,name}() can return NULL. The command socket path is hashed
when len(lxcpath) > sizeof(sun_path) - 2.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agocommands: non-functional changes
Christian Brauner [Sat, 6 May 2017 21:37:53 +0000 (23:37 +0200)] 
commands: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agocommands: avoid NULL pointer dereference
Christian Brauner [Sat, 6 May 2017 21:35:57 +0000 (23:35 +0200)] 
commands: avoid NULL pointer dereference

lxc_cmd_get_lxcpath() and lxc_cmd_get_name() both pass a nil pointer to
fill_sock_name(). Make sure that they are not dereferenced.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoconf: order mount options
Christian Brauner [Tue, 2 May 2017 21:37:16 +0000 (23:37 +0200)] 
conf: order mount options

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
8 years agoissue template: fix typo
Christian Brauner [Sun, 23 Apr 2017 20:04:54 +0000 (22:04 +0200)] 
issue template: fix typo

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>