]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
5 years agoUpdate lxc.containers.conf(5) in Japanese 3160/head
KATOH Yasufumi [Sat, 12 Oct 2019 16:39:52 +0000 (01:39 +0900)] 
Update lxc.containers.conf(5) in Japanese

Update for commit 767bd70

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #3159 from Rachid-Koucha/patch-1
Stéphane Graber [Sat, 12 Oct 2019 16:29:31 +0000 (12:29 -0400)] 
Merge pull request #3159 from Rachid-Koucha/patch-1

Bad sgml/man translation

5 years agoBad sgml/man translation 3159/head
Rachid Koucha [Sat, 12 Oct 2019 11:05:50 +0000 (13:05 +0200)] 
Bad sgml/man translation

When calling "man lxc.container.conf", an internal "man" keyword is displayed :

$ man lxc.container.conf
[...]
lxc.mount.entry
              Specify a mount point corresponding to a line in the fstab format.  Moreover lxc supports mount  propagation,  such  as
              rslave  or  rprivate, and adds three additional mount options.  optional don't fail if mount does not work.  create=dir
              or create=file to create dir (or file) when the point will be mounted.  relative source path is taken to be relative to
              the mounted container root. For instance,

dev/null proc/kcore none bind,relative 0 0
              .fi     <-----------------------------------UNEXPECTED KEYWORD !!!!

The problem seems to come from the missing blanks before "dev/null proc/kcore none bind,relative 0 0"

Moreover, for homogeneity purposes, it is better to use the "programlisting" tag used in the rest of the text instead of  "screen".

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
5 years agoMerge pull request #3157 from tenforward/japanese
Christian Brauner [Fri, 11 Oct 2019 07:20:46 +0000 (09:20 +0200)] 
Merge pull request #3157 from tenforward/japanese

Update Japanese lxc.container.conf(5)

5 years agoAdd more info about lxc.start.order in Japanese man 3157/head
KATOH Yasufumi [Fri, 11 Oct 2019 07:06:20 +0000 (16:06 +0900)] 
Add more info about lxc.start.order in Japanese man

Update for commit 0684250

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoAdd autodev.tmpfs.size to Japanese lxc.container.conf(5)
KATOH Yasufumi [Fri, 11 Oct 2019 07:04:06 +0000 (16:04 +0900)] 
Add autodev.tmpfs.size to Japanese lxc.container.conf(5)

Update for commit 63012bd

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #3155 from caioboffo/issue#3147
Christian Brauner [Thu, 10 Oct 2019 09:04:12 +0000 (11:04 +0200)] 
Merge pull request #3155 from caioboffo/issue#3147

Send successful output messages to log info instead of error

5 years agolxc-destroy: send successful output messages to log info instead of error. 3155/head
Caio B. Silva [Wed, 9 Oct 2019 19:00:58 +0000 (16:00 -0300)] 
lxc-destroy: send successful output messages to log info instead of error.

Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
5 years agoMerge pull request #3154 from ljelinek-cznic/doc-start-order
Stéphane Graber [Wed, 9 Oct 2019 13:36:12 +0000 (09:36 -0400)] 
Merge pull request #3154 from ljelinek-cznic/doc-start-order

doc: Add more info about 'lxc.start.order'

5 years agodoc: Add more info about 'lxc.start.order' 3154/head
Lukas Jelinek [Wed, 9 Oct 2019 10:15:48 +0000 (12:15 +0200)] 
doc: Add more info about 'lxc.start.order'

Signed-off-by: Lukas Jelinek <lukas.jelinek@nic.cz>
5 years agoMerge pull request #3152 from caioboffo/more_autoconf_improvements
Christian Brauner [Mon, 7 Oct 2019 13:31:49 +0000 (15:31 +0200)] 
Merge pull request #3152 from caioboffo/more_autoconf_improvements

Autoconf 2.69 conformance II

5 years agoupdate obsolete functions 3152/head
Caio B. Silva [Tue, 1 Oct 2019 14:36:05 +0000 (11:36 -0300)] 
update obsolete functions

Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
5 years agoMerge pull request #3128 from Napsty/add-parameter-devfs_size
Serge Hallyn [Fri, 4 Oct 2019 16:48:50 +0000 (09:48 -0700)] 
Merge pull request #3128 from Napsty/add-parameter-devfs_size

Add config parameter for /dev tmpfs size

5 years agoAdd autodev.tmpfs.size config parameter 3128/head
Claudio Kuenzler [Wed, 28 Aug 2019 11:01:00 +0000 (04:01 -0700)] 
Add autodev.tmpfs.size config parameter

Signed-off-by: Claudio Kuenzler <ck@claudiokuenzler.com>
5 years agoMerge pull request #2933 from brauner/2019-04-13/pdeath_signal_fixes
Serge Hallyn [Fri, 4 Oct 2019 14:33:23 +0000 (07:33 -0700)] 
Merge pull request #2933 from brauner/2019-04-13/pdeath_signal_fixes

start: handle setting pdeath signal in new pidns

5 years agostart: handle setting pdeath signal in new pidns 2933/head
Christian Brauner [Sat, 13 Apr 2019 14:41:30 +0000 (16:41 +0200)] 
start: handle setting pdeath signal in new pidns

In the usual case the child runs in a separate pid namespace. So far we haven't
been able to reliably set the pdeath signal. When we set the pdeath signal we
need to verify that we haven't lost a race whereby we have been orphaned and
though we have set a pdeath signal it won't help us since, well, the parent is
dead.
We were able to correctly handle this case when we were in the same pidns since
getppid() will return a valid pid. When we are in a separate pidns 0 will be
returned since the parent doesn't exist in our pidns.
A while back, while Jann and I were discussing other things he came up with a
nifty idea: simply pass an fd for the parent's status file and check the
"State:" field. This is the implementation of that idea.

Suggested-by: Jann Horn <jann@thejh.net>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3150 from brauner/2019-10-04/pidfd_fixes
Serge Hallyn [Fri, 4 Oct 2019 14:15:36 +0000 (07:15 -0700)] 
Merge pull request #3150 from brauner/2019-10-04/pidfd_fixes

start: pidfds obviously start - like any fd - at 0

5 years agostart: pidfds obviously start - like any fd - at 0 3150/head
Christian Brauner [Fri, 4 Oct 2019 08:31:41 +0000 (10:31 +0200)] 
start: pidfds obviously start - like any fd - at 0

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3149 from AlbanVidal/fix-lxc-update-config
Christian Brauner [Thu, 3 Oct 2019 19:23:51 +0000 (21:23 +0200)] 
Merge pull request #3149 from AlbanVidal/fix-lxc-update-config

Fix lxc-update-config in network.address

5 years agoFix lxc-update-config in network.address 3149/head
Alban VIDAL [Thu, 3 Oct 2019 16:32:47 +0000 (18:32 +0200)] 
Fix lxc-update-config in network.address

Signed-off-by: Alban VIDAL <zordhak@debian.org>
5 years agoMerge pull request #3146 from caioboffo/autoconf_2_69_conformance
Christian Brauner [Tue, 1 Oct 2019 09:32:16 +0000 (11:32 +0200)] 
Merge pull request #3146 from caioboffo/autoconf_2_69_conformance

Autoconf 2.69 conformance

5 years agoallow users to configure the option --enable-feature or --with-package, if an option... 3146/head
Caio B. Silva [Mon, 30 Sep 2019 12:25:00 +0000 (09:25 -0300)] 
allow users to configure the option --enable-feature or --with-package, if an option is given run shell commands action-if-given

Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
5 years agoSet minimun autoconf version to 2.69 and change obsolete function AC_HELP_STRING...
Caio B. Silva [Fri, 27 Sep 2019 16:35:43 +0000 (13:35 -0300)] 
Set minimun autoconf version to 2.69 and change obsolete function AC_HELP_STRING for AS_HELP_STRING

Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
5 years agoMerge pull request #3140 from caioboffo/fix3139
Christian Brauner [Tue, 24 Sep 2019 12:19:47 +0000 (14:19 +0200)] 
Merge pull request #3140 from caioboffo/fix3139

Ensures OpenSSL compatibility with older versions of EVP API.

5 years agoMerge pull request #3144 from tenforward/japanese
Stéphane Graber [Fri, 20 Sep 2019 10:22:52 +0000 (12:22 +0200)] 
Merge pull request #3144 from tenforward/japanese

Update Japanese man pages

5 years agodoc: Add the lxc.net.[i].veth.mode option in Japanese lxc.container.conf(5) 3144/head
KATOH Yasufumi [Fri, 20 Sep 2019 09:14:06 +0000 (18:14 +0900)] 
doc: Add the lxc.net.[i].veth.mode option in Japanese lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agodoc: Add Japanese pam_cgfs(8) man page
KATOH Yasufumi [Thu, 19 Sep 2019 16:15:12 +0000 (01:15 +0900)] 
doc: Add Japanese pam_cgfs(8) man page

* translate pam_cgfs(8)
* support --{enable,disable}-{commands,tools} in doc/ja

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #3141 from avhvr/man-pam_cgfs
Stéphane Graber [Wed, 18 Sep 2019 15:26:18 +0000 (17:26 +0200)] 
Merge pull request #3141 from avhvr/man-pam_cgfs

doc: add man page for pam_cgfs

5 years agodoc: add man page for pam_cgfs 3141/head
Venkata Harshavardhan Reddy Allu [Wed, 18 Sep 2019 13:08:23 +0000 (18:38 +0530)] 
doc: add man page for pam_cgfs

Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
5 years agoEnsures OpenSSL compatibility with older versions of EVP API. 3140/head
Caio B. Silva [Mon, 16 Sep 2019 17:22:33 +0000 (14:22 -0300)] 
Ensures OpenSSL compatibility with older versions of EVP API.

Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
5 years agoMerge pull request #3134 from jcfaracco/loop
Christian Brauner [Fri, 6 Sep 2019 07:10:22 +0000 (09:10 +0200)] 
Merge pull request #3134 from jcfaracco/loop

utils: Copying source filename to avoid missing info

5 years agoutils: Copying source filename to avoid missing info. 3134/head
Julio Faracco [Thu, 5 Sep 2019 04:43:21 +0000 (01:43 -0300)] 
utils: Copying source filename to avoid missing info.

Some applications use information from LOOP_GET_STATUS64. The file
associated with loop device is pointed inside structure field
`lo_file_name`. The current code is setting up a loop device without
this information. A legacy example of code checking this is cryptsetup:

    static char *_ioctl_backing_file(const char *loop)
    {
        struct loop_info64 lo64 = {0};
        int loop_fd;

        loop_fd = open(loop, O_RDONLY);
        if (loop_fd < 0)
            return NULL;

        if (ioctl(loop_fd, LOOP_GET_STATUS64, &lo64) < 0) {
            close(loop_fd);
            return NULL;
        }

        lo64.lo_file_name[LO_NAME_SIZE-2] = '*';
        lo64.lo_file_name[LO_NAME_SIZE-1] = 0;

        close(loop_fd);
        return strdup((char*)lo64.lo_file_name);
    }

It will return an empty string because lo_file_name was not set.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
5 years agoMerge pull request #3132 from brauner/2019-09-02/cgroup_improvements
Stéphane Graber [Tue, 3 Sep 2019 02:58:28 +0000 (20:58 -0600)] 
Merge pull request #3132 from brauner/2019-09-02/cgroup_improvements

cgroups: unify cgfsng_{un}freeze()

5 years agocgroups: unify cgfsng_{un}freeze() 3132/head
Christian Brauner [Mon, 2 Sep 2019 21:51:19 +0000 (23:51 +0200)] 
cgroups: unify cgfsng_{un}freeze()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3130 from brauner/2019-08-30/cgroup_fixes
Stéphane Graber [Thu, 29 Aug 2019 15:45:28 +0000 (09:45 -0600)] 
Merge pull request #3130 from brauner/2019-08-30/cgroup_fixes

cgroup: bugfixes

5 years agocgroups: initialize cgroup root directory - encore 3130/head
Christian Brauner [Thu, 29 Aug 2019 12:05:17 +0000 (14:05 +0200)] 
cgroups: initialize cgroup root directory - encore

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocgroups: check for empty cgroups on freeze/unfreeze
Christian Brauner [Thu, 29 Aug 2019 11:56:56 +0000 (13:56 +0200)] 
cgroups: check for empty cgroups on freeze/unfreeze

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3129 from brauner/2019-08-28/fix_cgroup_braino
Stéphane Graber [Wed, 28 Aug 2019 18:53:45 +0000 (12:53 -0600)] 
Merge pull request #3129 from brauner/2019-08-28/fix_cgroup_braino

cgroups: initialize cgroup root directory

5 years agocgroups: initialize cgroup root directory 3129/head
Christian Brauner [Wed, 28 Aug 2019 18:33:39 +0000 (20:33 +0200)] 
cgroups: initialize cgroup root directory

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3112 from avkvl/fix_count_user_network_interfaces
Christian Brauner [Wed, 28 Aug 2019 11:46:09 +0000 (13:46 +0200)] 
Merge pull request #3112 from avkvl/fix_count_user_network_interfaces

try to fix search user instead of search substring

5 years agoMerge pull request #3055 from Rachid-Koucha/patch-3
Christian Brauner [Tue, 27 Aug 2019 20:50:34 +0000 (22:50 +0200)] 
Merge pull request #3055 from Rachid-Koucha/patch-3

Use file/directory names from macro.h

5 years agoMerge pull request #3120 from brauner/2019-08-15/cgroup2_freezer
Stéphane Graber [Tue, 27 Aug 2019 20:01:41 +0000 (14:01 -0600)] 
Merge pull request #3120 from brauner/2019-08-15/cgroup2_freezer

cgroups: support cgroup2 freezer

5 years agoMerge pull request #3097 from lpirl/proc-1-uid_map-permission-denied
Stéphane Graber [Tue, 27 Aug 2019 19:38:57 +0000 (13:38 -0600)] 
Merge pull request #3097 from lpirl/proc-1-uid_map-permission-denied

suppress false-negative error in templates and nvidia hook

5 years agoMerge pull request #3122 from terceiro/lxc-attach-exit-status
Stéphane Graber [Tue, 27 Aug 2019 19:36:04 +0000 (13:36 -0600)] 
Merge pull request #3122 from terceiro/lxc-attach-exit-status

lxc-attach: make sure exit status of command is returned

5 years agoMerge pull request #3117 from P-EB/master
Stéphane Graber [Tue, 27 Aug 2019 19:34:28 +0000 (13:34 -0600)] 
Merge pull request #3117 from P-EB/master

[aa-profile] Deny access to /proc/acpi/**

5 years ago[aa-profile] Deny access to /proc/acpi/** 3117/head
Pierre-Elliott Bécue [Sat, 10 Aug 2019 20:07:42 +0000 (22:07 +0200)] 
[aa-profile] Deny access to /proc/acpi/**

Signed-off-by: Pierre-Elliott Bécue <becue@crans.org>
5 years agolxc-attach: make sure exit status of command is returned 3122/head
Antonio Terceiro [Sun, 18 Aug 2019 20:30:32 +0000 (17:30 -0300)] 
lxc-attach: make sure exit status of command is returned

Commit ae68cad763d5b39a6a9e51de2acd1ad128b720ca introduced a regression that
makes lxc-attach ignore the exit status of the executed command. This was first
identified in 3.0.4 LTS, while it worked on 3.0.3.

  # lxc-attach --version
  3.0.4
  # lxc-attach -n test false; echo $?
  0

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934983

5 years agoMerge pull request #3124 from qianfan-Zhao/lxc-create-abs-path
Christian Brauner [Mon, 26 Aug 2019 15:15:13 +0000 (17:15 +0200)] 
Merge pull request #3124 from qianfan-Zhao/lxc-create-abs-path

lxc-create: check absoule path for param '--dir'

5 years agocgfsng: mount pure unified cgroup layout correctly 3120/head
Christian Brauner [Mon, 26 Aug 2019 14:16:16 +0000 (16:16 +0200)] 
cgfsng: mount pure unified cgroup layout correctly

When pure cgroup unified mode is used we cannot pre-mount a tmpfs as this
confuses systemd.
Users should also set lxc.mount.auto = cgroup:force to ensure that systemd in
the container and on the host use identical cgroup layouts.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxc-create: check absoule path for param '--dir' 3124/head
qianfan Zhao [Mon, 19 Aug 2019 01:54:34 +0000 (09:54 +0800)] 
lxc-create: check absoule path for param '--dir'

Fix: #3123

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
5 years agocgroups: support cgroup2 freezer
Christian Brauner [Thu, 15 Aug 2019 17:50:39 +0000 (19:50 +0200)] 
cgroups: support cgroup2 freezer

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3119 from Blub/2019-08-13/fix_lxc_attach_getent_stderr
Christian Brauner [Tue, 13 Aug 2019 12:38:42 +0000 (14:38 +0200)] 
Merge pull request #3119 from Blub/2019-08-13/fix_lxc_attach_getent_stderr

attach: don't close stdout of getent

5 years agoattach: don't close stdout of getent 3119/head
Wolfgang Bumiller [Tue, 13 Aug 2019 12:17:30 +0000 (14:17 +0200)] 
attach: don't close stdout of getent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoMerge pull request #3113 from jcfaracco/clang
Christian Brauner [Sat, 3 Aug 2019 14:33:30 +0000 (10:33 -0400)] 
Merge pull request #3113 from jcfaracco/clang

utils: Fix wrong integer of a function parameter.

6 years agoutils: Fix wrong integer of a function parameter. 3113/head
Julio Faracco [Sat, 3 Aug 2019 05:16:13 +0000 (02:16 -0300)] 
utils: Fix wrong integer of a function parameter.

If SSL is enabled, utils will include function `do_sha1_hash()` to
generate a sha1 encrypted buffer. Last function argument of
`EVP_DigestFinal_ex()` requires a `unsigned int` but the current
parameter is an `integer` type.

See error:
utils.c:350:38: error: passing 'int *' to parameter of type 'unsigned int *' converts between pointers to integer types with different sign
      [-Werror,-Wpointer-sign]
        EVP_DigestFinal_ex(mdctx, md_value, md_len);
                                            ^~~~~~
/usr/include/openssl/evp.h:549:49: note: passing argument to parameter 's' here
                                  unsigned int *s);

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
6 years agotry to fix search user instead of search substring 3112/head
Alexander Kriventsov [Mon, 29 Jul 2019 16:33:39 +0000 (19:33 +0300)] 
try to fix search user instead of search substring

Signed-off-by: Alexander Kriventsov <akriventsov@nic.ru>
6 years agoMerge pull request #3107 from tomponline/tp-wlan-detach
Christian Brauner [Mon, 29 Jul 2019 16:10:46 +0000 (12:10 -0400)] 
Merge pull request #3107 from tomponline/tp-wlan-detach

lxccontainer: do_lxcapi_detach_interface to support detaching wlan devs

6 years agolxccontainer: do_lxcapi_detach_interface to support detaching wlan devices 3107/head
Thomas Parrott [Fri, 26 Jul 2019 15:14:18 +0000 (16:14 +0100)] 
lxccontainer: do_lxcapi_detach_interface to support detaching wlan devices

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
6 years agoMerge pull request #3109 from brauner/2019-07-28/bugfixes
Stéphane Graber [Mon, 29 Jul 2019 03:43:24 +0000 (23:43 -0400)] 
Merge pull request #3109 from brauner/2019-07-28/bugfixes

cgroups: initialize cpuset properly

6 years agocgroups: initialize cpuset properly 3109/head
Christian Brauner [Sun, 28 Jul 2019 21:13:26 +0000 (23:13 +0200)] 
cgroups: initialize cpuset properly

Closes #3108.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #3102 from brauner/2019-07-22/bugfixes
Wolfgang Bumiller [Sun, 28 Jul 2019 17:07:21 +0000 (19:07 +0200)] 
Merge pull request #3102 from brauner/2019-07-22/bugfixes

tree-wide: initialize all auto-cleanup variables

6 years agoMerge pull request #3106 from brauner/2019-07-25/bugfixes
Stéphane Graber [Fri, 26 Jul 2019 13:36:24 +0000 (09:36 -0400)] 
Merge pull request #3106 from brauner/2019-07-25/bugfixes

network: restore ability to move nl80211 devices

6 years agonetwork: restore ability to move nl80211 devices 3106/head
Christian Brauner [Fri, 26 Jul 2019 06:20:02 +0000 (08:20 +0200)] 
network: restore ability to move nl80211 devices

Closes #3105.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #3103 from tych0/info-on-enosys
Christian Brauner [Tue, 23 Jul 2019 15:48:12 +0000 (17:48 +0200)] 
Merge pull request #3103 from tych0/info-on-enosys

pidfds: don't print a scary warning on ENOSYS

6 years agopidfds: don't print a scary warning on ENOSYS 3103/head
Tycho Andersen [Tue, 23 Jul 2019 15:40:14 +0000 (09:40 -0600)] 
pidfds: don't print a scary warning on ENOSYS

Most kernels don't have this functionality yet, and so the warning is
printed a lot. Our people are scared of warnings, so let's make it INFO
instead in this case.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agotree-wide: initialize all auto-cleanup variables 3102/head
Christian Brauner [Tue, 23 Jul 2019 14:41:46 +0000 (16:41 +0200)] 
tree-wide: initialize all auto-cleanup variables

Closes: #3101.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoRe-enable devel flag
Stéphane Graber [Mon, 22 Jul 2019 22:42:42 +0000 (18:42 -0400)] 
Re-enable devel flag

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoRelease LXC 3.2.1 lxc-3.2.1
Stéphane Graber [Mon, 22 Jul 2019 22:32:29 +0000 (18:32 -0400)] 
Release LXC 3.2.1

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agoRelease LXC 3.2.0 lxc-3.2.0
Stéphane Graber [Mon, 22 Jul 2019 22:24:40 +0000 (18:24 -0400)] 
Release LXC 3.2.0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agolxc-download: Pre-release bump of compat
Stéphane Graber [Mon, 22 Jul 2019 22:23:48 +0000 (18:23 -0400)] 
lxc-download: Pre-release bump of compat

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agosuppress false-negative error in templates and nvidia hook 3097/head
Lukas Pirl [Mon, 22 Jul 2019 12:29:52 +0000 (14:29 +0200)] 
suppress false-negative error in templates and nvidia hook

``/proc`` might be mounted with ``hidepid=2``.
This makes ``/proc/1/…`` appear absent for non-root users.
When using the templates or the nvidia hook as a non-root user
(e.g., when creating unprivileged containers) the error
"/proc/1/uid_map: No such file or directory" is printed.
Since the script works correctly despite the error, this error
message might be confusing for users.

Signed-off-by: Lukas Pirl <git@lukas-pirl.de>
6 years agoMerge pull request #3092 from Blub/seccomp-mem-rdwr
Christian Brauner [Tue, 16 Jul 2019 13:17:11 +0000 (15:17 +0200)] 
Merge pull request #3092 from Blub/seccomp-mem-rdwr

seccomp: open memfd read-write

6 years agoseccomp: open memfd read-write 3092/head
Wolfgang Bumiller [Tue, 16 Jul 2019 09:22:50 +0000 (11:22 +0200)] 
seccomp: open memfd read-write

Makes it easier to implement syscalls which need to write to
a buffer passed by user space as a pointer.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoMerge pull request #2921 from tomponline/tp-2019-03-26/routedveth
Christian Brauner [Thu, 11 Jul 2019 12:41:00 +0000 (14:41 +0200)] 
Merge pull request #2921 from tomponline/tp-2019-03-26/routedveth

Adds veth router mode

6 years agodoc: Documents the lxc.net.[i].veth.mode option 2921/head
tomponline [Wed, 3 Apr 2019 11:57:32 +0000 (11:57 +0000)] 
doc: Documents the lxc.net.[i].veth.mode option

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
6 years agonetwork: Adds veth router mode static routes and proxy entries
Thomas Parrott [Fri, 5 Jul 2019 13:46:19 +0000 (14:46 +0100)] 
network: Adds veth router mode static routes and proxy entries

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
6 years agonetwork: Adds mode param (bridge, router) to veth network setting
Thomas Parrott [Fri, 5 Jul 2019 13:46:49 +0000 (14:46 +0100)] 
network: Adds mode param (bridge, router) to veth network setting

Defaulting to bridge mode.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
6 years agolxc/log: Adds error_log_errno macro
Thomas Parrott [Tue, 21 May 2019 16:25:52 +0000 (17:25 +0100)] 
lxc/log: Adds error_log_errno macro

Suggested usage:

return error_log_errno(err, "Failed: %s", "some error");

It sets errno to the value of err, then calls SYSERROR with the format and remaining args.

It always returns -1.

Suggested-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
6 years agoMerge pull request #3090 from Rachid-Koucha/patch-3
Christian Brauner [Thu, 11 Jul 2019 10:10:28 +0000 (12:10 +0200)] 
Merge pull request #3090 from Rachid-Koucha/patch-3

Suppress hardcoded table sizes

6 years agoSuppress hardcoded table sizes 3090/head
Rachid Koucha [Thu, 11 Jul 2019 08:01:36 +0000 (10:01 +0200)] 
Suppress hardcoded table sizes

. Use sizeof() instead of hardcoded values
. snprintf(..., size, ""...) is in error if the return code is >= size (not sufficient to set only ">")

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
6 years agoMerge pull request #3089 from Rachid-Koucha/patch-2
Christian Brauner [Thu, 11 Jul 2019 07:57:34 +0000 (09:57 +0200)] 
Merge pull request #3089 from Rachid-Koucha/patch-2

Typo fix

6 years agoTypo fix 3089/head
Rachid Koucha [Thu, 11 Jul 2019 07:42:05 +0000 (09:42 +0200)] 
Typo fix

Fixed a typo in error message

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
6 years agoMerge pull request #3088 from tenforward/japanese
Christian Brauner [Thu, 11 Jul 2019 06:28:11 +0000 (08:28 +0200)] 
Merge pull request #3088 from tenforward/japanese

doc: Add lxc.comp.notify.cookie to Japanese lxc.container.conf(5)

6 years agodoc: Add lxc.comp.notify.cookie to Japanese lxc.container.conf(5) 3088/head
KATOH Yasufumi [Thu, 11 Jul 2019 06:22:08 +0000 (15:22 +0900)] 
doc: Add lxc.comp.notify.cookie to Japanese lxc.container.conf(5)

update for commit 214008e

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
6 years agoMerge pull request #3087 from brauner/master
Stéphane Graber [Wed, 10 Jul 2019 14:53:45 +0000 (10:53 -0400)] 
Merge pull request #3087 from brauner/master

cgroup: check for non-empty conf

6 years agocgroup: check for non-empty conf 3087/head
Christian Brauner [Wed, 10 Jul 2019 14:34:29 +0000 (16:34 +0200)] 
cgroup: check for non-empty conf

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #3086 from brauner/2019-07-09/seccomp_fixes
Stéphane Graber [Tue, 9 Jul 2019 19:15:41 +0000 (15:15 -0400)] 
Merge pull request #3086 from brauner/2019-07-09/seccomp_fixes

seccomp: coding style

6 years agoseccomp: coding style 3086/head
Christian Brauner [Tue, 9 Jul 2019 19:08:20 +0000 (21:08 +0200)] 
seccomp: coding style

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #3080 from Blub/seccomp-notify-api
Christian Brauner [Tue, 9 Jul 2019 15:50:44 +0000 (17:50 +0200)] 
Merge pull request #3080 from Blub/seccomp-notify-api

Seccomp notify api update

6 years agoaf_unix: remove unused variable 3080/head
Christian Brauner [Tue, 9 Jul 2019 15:19:29 +0000 (17:19 +0200)] 
af_unix: remove unused variable

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoseccomp: send caller pidfd along with proxied requests
Wolfgang Bumiller [Tue, 9 Jul 2019 10:18:43 +0000 (12:18 +0200)] 
seccomp: send caller pidfd along with proxied requests

On the one hand this should close the race between the
process exiting until the proxy reads the request.
On the other hand it'll help the proxy quickly access info
from /proc (such as ./cwd, ./ns/mnt, ...)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: recvmsg with MSG_TRUNC
Wolfgang Bumiller [Mon, 8 Jul 2019 16:00:20 +0000 (18:00 +0200)] 
seccomp: recvmsg with MSG_TRUNC

We only read the message without the cookie. For now assert
that the sender also didn't try to send more by letting
`recvmsg()` return the original size of the packet if it was
longer.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agodoc: document lxc.seccomp.notify.cookie
Wolfgang Bumiller [Fri, 5 Jul 2019 17:21:34 +0000 (19:21 +0200)] 
doc: document lxc.seccomp.notify.cookie

and fix a minor typo

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: defer reconnecting to the proxy
Wolfgang Bumiller [Fri, 5 Jul 2019 09:36:07 +0000 (11:36 +0200)] 
seccomp: defer reconnecting to the proxy

With the previous commit we now attempt to reconnect to the
proxy in the beginning of the notify handler if we had no
connection.
If the connection fails later on, we now don't really need
to immediately try to reconnect if we send a default
response anyway (particularly if the recv() fails). (This
also gives the proxy more time, for instance if it was just
restarted.)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: keep retrying to reconnect to proxy
Wolfgang Bumiller [Fri, 5 Jul 2019 09:30:24 +0000 (11:30 +0200)] 
seccomp: keep retrying to reconnect to proxy

If a syscall happens after we already failed to communicate
with the proxy, proxy_fd was -1.
Before the previous commit we'd then be stuck in the state
where there was no proxy registered. With the previous
commit we'd send a default reply and only then try to
reconnect.
Improve this even further by trying to reconnect right at
the start.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: send default response when there's no proxy
Wolfgang Bumiller [Fri, 5 Jul 2019 09:22:34 +0000 (11:22 +0200)] 
seccomp: send default response when there's no proxy

Particularly, when there's no proxy registered (iow. none
configured but the seccomp profile still had a 'notify'
rule), we don't want to leave them hanging.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: retry connecting to the proxy once
Wolfgang Bumiller [Fri, 5 Jul 2019 08:41:19 +0000 (10:41 +0200)] 
seccomp: retry connecting to the proxy once

If the first sendmsg() fails, try to reconnect once before
failing. Otherwise if a proxy restarts while no syscall
happens, the next syscall always fails with ENOSYS.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: don't ignore syscalls when there's no proxy
Wolfgang Bumiller [Fri, 5 Jul 2019 07:44:17 +0000 (09:44 +0200)] 
seccomp: don't ignore syscalls when there's no proxy

The container process would just hang.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: remove reconnect-loop
Wolfgang Bumiller [Fri, 5 Jul 2019 07:40:04 +0000 (09:40 +0200)] 
seccomp: remove reconnect-loop

When we fail to send a message, we send a default seccomp
response and try to reconnect to the proxy. It doesn't
really make much sense to retry to send the request over the
new connection as the syscall has already been answered. The
same goes for receiving the response - after reconnecting to
the proxy, we're a new client to a potentially new proxy
process, so awaiting a response without having sent a
request doesn't make all too much sense either.

In the future we should probably have a timeout or retry
count for the entire proxy _transaction_ before sending a
response to seccomp at all (and probably handle requests
asynchronously).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoseccomp: use SOCK_SEQPACKET for the notify proxy
Wolfgang Bumiller [Fri, 5 Jul 2019 07:31:09 +0000 (09:31 +0200)] 
seccomp: use SOCK_SEQPACKET for the notify proxy

The seccomp notify API has a few variables: The struct sizes
are queried at runtime, and we now also have a user
configured cookie.
This means that with a SOCK_STREAM connection the proxy
needs to carefully read() the right amount of data based on
the contents of our proxy message struct to avoid ending up
in the middle of a packet.
While for now this may not be too tragic, since we currently
only ever send a single packet and then wait for the
response, we may at some point want to be able to handle
multiple processes simultaneously, hence it makes sense to
switch to a packet based connection.

So switch to using SOCK_SEQPACKET which is packet based,
(and also guarantees ordering). The `MSG_PEEK` flag can be
used with `recvmsg()` to figure out a packet's size on the
other end, and usually the size *should* not change after
that for an existing connection from a running container.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>