Commit Graph

9423 Commits

Author SHA1 Message Date
Wolfgang Bumiller
ce70ff7c4c terminal: return NULL on error in terminal_signal_init
Callers expect a NULL on error, and with PR #3171 marking
the pointer as __do_free, we now return a pointer to freed
memory here otherwise.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-29 08:42:59 +01:00
Stéphane Graber
636a2ef2f9
Merge pull request #3171 from brauner/bugfixes
terminal: prevent memory leak for lxc_terminal_state
2019-10-25 09:38:25 -04:00
Christian Brauner
28327a43e2
terminal: prevent memory leak for lxc_terminal_state
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-10-25 15:14:12 +02:00
Christian Brauner
a86690e0c2
Merge pull request #3169 from Blub/2019-10-23/aa_prevent_proc-acpi
apparmor: Prevent writes to /proc/acpi/**
2019-10-23 11:02:37 +02:00
Wolfgang Bumiller
95ad620e0c apparmor: Prevent writes to /proc/acpi/**
Same as #3117.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-10-23 10:53:21 +02:00
Christian Brauner
344b8ee293
Merge pull request #3168 from havmind/memfd_create_powerpc
syscall_wrappers: rename internal memfd_create to memfd_create_lxc
2019-10-22 14:09:47 +02:00
Patrick Havelange
40b06c7877 syscall_wrappers: rename internal memfd_create to memfd_create_lxc
In case the internal memfd_create has to be used, make sure we don't
clash with the already existing memfd_create function from glibc.

This can happen if this glibc function is a stub. In this case, at
./configure time, the test for this function will return false, however
the declaration of that function is still available. This leads to
compilation errors.

Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
2019-10-22 13:58:30 +02:00
Christian Brauner
6637fb9f48
Merge pull request #3161 from tomponline/tp-lxc-destroy
lxc/tools/lxc/destroy: Restores error message on container destroy
2019-10-14 11:21:01 +02:00
Thomas Parrott
a0e686fdac lxc/tools/lxc/destroy: Restores error message on container destroy
Partially reverts 65b92ea5fc so that trying to destroy a non-existent container gives an error message.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2019-10-14 10:13:48 +01:00
Stéphane Graber
ebd5b33c8d
Merge pull request #3160 from tenforward/japanese
Update lxc.containers.conf(5) in Japanese
2019-10-12 12:49:52 -04:00
KATOH Yasufumi
8f6d5e9cc8 Update lxc.containers.conf(5) in Japanese
Update for commit 767bd70

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2019-10-13 01:39:52 +09:00
Stéphane Graber
0065a2fd47
Merge pull request #3159 from Rachid-Koucha/patch-1
Bad sgml/man translation
2019-10-12 12:29:31 -04:00
Rachid Koucha
767bd70a6b
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>
2019-10-12 13:05:50 +02:00
Christian Brauner
ce15092995
Merge pull request #3157 from tenforward/japanese
Update Japanese lxc.container.conf(5)
2019-10-11 09:20:46 +02:00
KATOH Yasufumi
a517f6d61f Add more info about lxc.start.order in Japanese man
Update for commit 0684250

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2019-10-11 16:08:29 +09:00
KATOH Yasufumi
9c744e39c3 Add autodev.tmpfs.size to Japanese lxc.container.conf(5)
Update for commit 63012bd

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2019-10-11 16:04:06 +09:00
Christian Brauner
19a6b624a8
Merge pull request #3155 from caioboffo/issue#3147
Send successful output messages to log info instead of error
2019-10-10 11:04:12 +02:00
Caio B. Silva
65b92ea5fc lxc-destroy: send successful output messages to log info instead of error.
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-10-09 16:06:44 -03:00
Stéphane Graber
9e0cfe4977
Merge pull request #3154 from ljelinek-cznic/doc-start-order
doc: Add more info about 'lxc.start.order'
2019-10-09 09:36:12 -04:00
Lukas Jelinek
0684250fa6
doc: Add more info about 'lxc.start.order'
Signed-off-by: Lukas Jelinek <lukas.jelinek@nic.cz>
2019-10-09 12:28:05 +02:00
Christian Brauner
559b39b9e0
Merge pull request #3152 from caioboffo/more_autoconf_improvements
Autoconf 2.69 conformance II
2019-10-07 15:31:49 +02:00
Caio B. Silva
d12860c00b update obsolete functions
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-10-07 10:04:29 -03:00
Serge Hallyn
83bac1bf25
Merge pull request #3128 from Napsty/add-parameter-devfs_size
Add config parameter for /dev tmpfs size
2019-10-04 09:48:50 -07:00
Claudio Kuenzler
63012bdd00 Add autodev.tmpfs.size config parameter
Signed-off-by: Claudio Kuenzler <ck@claudiokuenzler.com>
2019-10-04 09:47:23 -07:00
Serge Hallyn
345a21ca9e
Merge pull request #2933 from brauner/2019-04-13/pdeath_signal_fixes
start: handle setting pdeath signal in new pidns
2019-10-04 07:33:23 -07:00
Christian Brauner
4d8bdfa030 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>
2019-10-04 07:31:37 -07:00
Serge Hallyn
1d24b87a1a
Merge pull request #3150 from brauner/2019-10-04/pidfd_fixes
start: pidfds obviously start - like any fd - at 0
2019-10-04 07:15:36 -07:00
Christian Brauner
d1687497fb
start: pidfds obviously start - like any fd - at 0
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-10-04 10:31:41 +02:00
Christian Brauner
39eaee5777
Merge pull request #3149 from AlbanVidal/fix-lxc-update-config
Fix lxc-update-config in network.address
2019-10-03 21:23:51 +02:00
Alban VIDAL
09c3670571 Fix lxc-update-config in network.address
Signed-off-by: Alban VIDAL <zordhak@debian.org>
2019-10-03 18:43:25 +02:00
Christian Brauner
8d06d0c8fe
Merge pull request #3146 from caioboffo/autoconf_2_69_conformance
Autoconf 2.69 conformance
2019-10-01 11:32:16 +02:00
Caio B. Silva
b2963bf912 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>
2019-09-30 11:04:17 -03:00
Caio B. Silva
f756a3501a 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>
2019-09-27 13:35:43 -03:00
Christian Brauner
5c85a4a34c
Merge pull request #3140 from caioboffo/fix3139
Ensures OpenSSL compatibility with older versions of EVP API.
2019-09-24 14:19:47 +02:00
Stéphane Graber
2a92bddc21
Merge pull request #3144 from tenforward/japanese
Update Japanese man pages
2019-09-20 12:22:52 +02:00
KATOH Yasufumi
0cf801fb65 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>
2019-09-20 18:16:47 +09:00
KATOH Yasufumi
6da6d73e44 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>
2019-09-20 01:15:12 +09:00
Stéphane Graber
35b76c7b4b
Merge pull request #3141 from avhvr/man-pam_cgfs
doc: add man page for pam_cgfs
2019-09-18 17:26:18 +02:00
Venkata Harshavardhan Reddy Allu
a98ad25d3a doc: add man page for pam_cgfs
Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
2019-09-18 18:38:23 +05:30
Caio B. Silva
b138bfcfd1 Ensures OpenSSL compatibility with older versions of EVP API.
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
2019-09-16 14:22:33 -03:00
Christian Brauner
d62ac98582
Merge pull request #3134 from jcfaracco/loop
utils: Copying source filename to avoid missing info
2019-09-06 09:10:22 +02:00
Julio Faracco
a70c9e85a6 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>
2019-09-05 17:52:17 -03:00
Stéphane Graber
13a885dd10
Merge pull request #3132 from brauner/2019-09-02/cgroup_improvements
cgroups: unify cgfsng_{un}freeze()
2019-09-02 20:58:28 -06:00
Christian Brauner
ee3a77758d
cgroups: unify cgfsng_{un}freeze()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-09-02 23:51:19 +02:00
Stéphane Graber
f1e0e31261
Merge pull request #3130 from brauner/2019-08-30/cgroup_fixes
cgroup: bugfixes
2019-08-29 09:45:28 -06:00
Christian Brauner
c18c6b63b8
cgroups: initialize cgroup root directory - encore
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-08-29 14:05:17 +02:00
Christian Brauner
81468ea7c0
cgroups: check for empty cgroups on freeze/unfreeze
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-08-29 13:56:56 +02:00
Stéphane Graber
8ba5849018
Merge pull request #3129 from brauner/2019-08-28/fix_cgroup_braino
cgroups: initialize cgroup root directory
2019-08-28 12:53:45 -06:00
Christian Brauner
6607d6e91d
cgroups: initialize cgroup root directory
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-08-28 20:33:39 +02:00
Christian Brauner
f327a062c2
Merge pull request #3112 from avkvl/fix_count_user_network_interfaces
try to fix search user instead of search substring
2019-08-28 13:46:09 +02:00