]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
5 years agonetwork: Adds support host side veth device static routes
tomponline [Thu, 25 Apr 2019 11:47:17 +0000 (12:47 +0100)]
network: Adds support host side veth device static routes

Adds the following new config keys:

lxc.net.[i].veth.ipv4.route
lxc.net.[i].veth.ipv6.route
E.g.

lxc.net.0.veth.ipv4.route = 192.0.2.1/32
lxc.net.0.veth.ipv4.route = 192.0.3.0/24
lxc.net.0.veth.ipv6.route = 2001:db8::1/128
lxc.net.0.veth.ipv6.route = 2001:db8:2::/64

Signed-off-by: tomponline <thomas.parrott@canonical.com>
5 years agoMerge pull request #2951 from tomponline/tp-typo
Stéphane Graber [Fri, 26 Apr 2019 18:45:10 +0000 (14:45 -0400)]
Merge pull request #2951 from tomponline/tp-typo

network: Fixes a little typo in an error message

5 years agoMerge pull request #2952 from tomponline/tp-vlan-upscript
Stéphane Graber [Fri, 26 Apr 2019 18:44:55 +0000 (14:44 -0400)]
Merge pull request #2952 from tomponline/tp-vlan-upscript

network: Adds hook handling for vlan network type

5 years agonetwork: Adds upscript handling for vlan network type
tomponline [Fri, 26 Apr 2019 17:01:53 +0000 (18:01 +0100)]
network: Adds upscript handling for vlan network type

Signed-off-by: tomponline <thomas.parrott@canonical.com>
5 years agonetwork: Fixes a little typo in an error message
tomponline [Fri, 26 Apr 2019 16:49:32 +0000 (17:49 +0100)]
network: Fixes a little typo in an error message

Signed-off-by: tomponline <thomas.parrott@canonical.com>
5 years agoMerge pull request #2947 from brauner/2019-04-18/seccomp_trap
Stéphane Graber [Thu, 25 Apr 2019 22:44:37 +0000 (18:44 -0400)]
Merge pull request #2947 from brauner/2019-04-18/seccomp_trap

seccomp: SECCOMP_RET_USER_NOTIF support

5 years agostart: silence clang
Christian Brauner [Thu, 25 Apr 2019 15:20:39 +0000 (17:20 +0200)]
start: silence clang

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoapi_extensions: add seccomp_notify
Christian Brauner [Thu, 25 Apr 2019 13:25:23 +0000 (15:25 +0200)]
api_extensions: add seccomp_notify

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agodoc: add lxc.seccomp.notify.proxy
Christian Brauner [Thu, 25 Apr 2019 14:40:40 +0000 (16:40 +0200)]
doc: add lxc.seccomp.notify.proxy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoseccomp: send default answer and try to reconnect
Christian Brauner [Thu, 25 Apr 2019 13:53:14 +0000 (15:53 +0200)]
seccomp: send default answer and try to reconnect

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile: add lxc.seccomp.notify.proxy
Christian Brauner [Thu, 25 Apr 2019 12:51:51 +0000 (14:51 +0200)]
confile: add lxc.seccomp.notify.proxy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoseccomp: SECCOMP_RET_USER_NOTIF support
Christian Brauner [Sun, 21 Apr 2019 19:03:51 +0000 (21:03 +0200)]
seccomp: SECCOMP_RET_USER_NOTIF support

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2948 from pgauret/patch-1
Christian Brauner [Wed, 24 Apr 2019 16:30:43 +0000 (18:30 +0200)]
Merge pull request #2948 from pgauret/patch-1

Fix 'zfs get' command order

5 years agoFix 'zfs get' command order
pgauret [Wed, 24 Apr 2019 16:29:21 +0000 (18:29 +0200)]
Fix 'zfs get' command order

Another case of calling 'zfs get' which requires reordering arguments to work with latest zfs.

Signed-off-by: Paul Gauret <pgauret@yahoo.com>
5 years agoMerge pull request #2946 from tych0/remove-bad-doc
Christian Brauner [Tue, 23 Apr 2019 15:08:13 +0000 (17:08 +0200)]
Merge pull request #2946 from tych0/remove-bad-doc

lxc-start: remove bad doc

5 years agolxc-start: remove bad doc
Tycho Andersen [Tue, 23 Apr 2019 14:48:29 +0000 (08:48 -0600)]
lxc-start: remove bad doc

We don't in fact exit(1) if this is not specified, and it wouldn't make
sense to, since most people probably don't specify this.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
5 years agoMerge pull request #2945 from brauner/2019-04-19/netns_getifaddrs_adapt_to_kernel_changes
Stéphane Graber [Fri, 19 Apr 2019 17:58:23 +0000 (13:58 -0400)]
Merge pull request #2945 from brauner/2019-04-19/netns_getifaddrs_adapt_to_kernel_changes

netns_getifaddrs: adapt to kernel changes

5 years agonetns_getifaddrs: adapt to kernel changes
Christian Brauner [Fri, 19 Apr 2019 13:24:51 +0000 (15:24 +0200)]
netns_getifaddrs: adapt to kernel changes

s/NETLINK_DUMP_STRICT_CHK/NETLINK_GET_STRICT_CHK/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2943 from brauner/master
Stéphane Graber [Wed, 17 Apr 2019 17:29:07 +0000 (18:29 +0100)]
Merge pull request #2943 from brauner/master

configure: s/LDLAGS/LDFLAGS/

5 years agoconfigure: s/LDLAGS/LDFLAGS/
Christian Brauner [Wed, 17 Apr 2019 17:12:07 +0000 (19:12 +0200)]
configure: s/LDLAGS/LDFLAGS/

I apparently cannot spell.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2940 from brauner/master
Stéphane Graber [Wed, 17 Apr 2019 07:49:05 +0000 (08:49 +0100)]
Merge pull request #2940 from brauner/master

raw_syscalls: lxc_raw_clone() account for different trap number on 32bit SPARC

5 years agoMerge pull request #2941 from flx42/reorder-mounts
Christian Brauner [Tue, 16 Apr 2019 22:29:28 +0000 (00:29 +0200)]
Merge pull request #2941 from flx42/reorder-mounts

conf: do lxc.mount.entry mounts right after lxc.mount.fstab

5 years agoMerge pull request #2942 from flx42/nvidia-hook-handle-spaces-env
Christian Brauner [Tue, 16 Apr 2019 22:00:18 +0000 (00:00 +0200)]
Merge pull request #2942 from flx42/nvidia-hook-handle-spaces-env

hooks/nvidia: handle spaces in NVIDIA_REQUIRE variables

5 years agoconf: do lxc.mount.entry mounts right after lxc.mount.fstab
Felix Abecassis [Tue, 16 Apr 2019 21:40:03 +0000 (14:40 -0700)]
conf: do lxc.mount.entry mounts right after lxc.mount.fstab

These configuration options use the same syntax and therefore it seems
more intuitive to have the same behavior for both of them, which is
not the case today since mount hooks and autodev mounts are called
between the two.

See: https://github.com/lxc/lxc/issues/2932

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoraw_syscalls: lxc_raw_clone()
Christian Brauner [Tue, 16 Apr 2019 21:32:03 +0000 (23:32 +0200)]
raw_syscalls: lxc_raw_clone()

Account for different trap number on 32bit SPARC.

Link: https://bugs.gentoo.org/656368
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agohooks/nvidia: handle spaces in NVIDIA_REQUIRE variables
Felix Abecassis [Tue, 16 Apr 2019 20:58:51 +0000 (13:58 -0700)]
hooks/nvidia: handle spaces in NVIDIA_REQUIRE variables

Previously, environment variables with a space where splitted.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2938 from pgauret/patch-1
Christian Brauner [Mon, 15 Apr 2019 22:22:41 +0000 (00:22 +0200)]
Merge pull request #2938 from pgauret/patch-1

Update zfs.c

5 years agostorage: update zfs
pgauret [Mon, 15 Apr 2019 07:18:42 +0000 (09:18 +0200)]
storage: update zfs

Change zfs arguments. This also works with older zfs versions, tested with
zfs 0.7.9-3 on Ubuntu 18.10.

Closes #2916.

Signed-off-by: Paul Gauret <pgauret@yahoo.com>
[christian.brauner@ubuntu.com: adapt commit message and add Signed-off-by for Paul]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2937 from brauner/2019-04-14/issue_2912
Stéphane Graber [Sun, 14 Apr 2019 18:07:34 +0000 (14:07 -0400)]
Merge pull request #2937 from brauner/2019-04-14/issue_2912

storage: prevent unitialized variable warning

5 years agoMerge pull request #2936 from brauner/2019-04-14/issue_2935
Stéphane Graber [Sun, 14 Apr 2019 18:03:59 +0000 (14:03 -0400)]
Merge pull request #2936 from brauner/2019-04-14/issue_2935

cgroups: fix potential nullderef

5 years agostorage: prevent unitialized variable warning
Christian Brauner [Sun, 14 Apr 2019 13:46:12 +0000 (15:46 +0200)]
storage: prevent unitialized variable warning

We can simply fix this issue by switching to our cleanup macros instead of
manually freeing the memory.

Closes #2912.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocgroups: fix potential nullderef
Christian Brauner [Sun, 14 Apr 2019 13:30:22 +0000 (15:30 +0200)]
cgroups: fix potential nullderef

The child_path variable is initialized very late in the function so jumping to
the on_error label would cause a nullderef. With the cleanup macros we can
simplify this function to simply do direct returns and avoid that whole issue.

Closes #2935.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2934 from brauner/2019-04-13/simplify_and_test
Stéphane Graber [Sat, 13 Apr 2019 17:49:30 +0000 (13:49 -0400)]
Merge pull request #2934 from brauner/2019-04-13/simplify_and_test

attach: use tighter scope for fd variable

5 years agoattach: use tighter scope for fd variable
Christian Brauner [Sat, 13 Apr 2019 17:08:49 +0000 (19:08 +0200)]
attach: use tighter scope for fd variable

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2928 from yosukesan/api_doc_generation_fails_under_out_of_source_...
Christian Brauner [Sat, 6 Apr 2019 13:14:31 +0000 (15:14 +0200)]
Merge pull request #2928 from yosukesan/api_doc_generation_fails_under_out_of_source_build#2927

fix: #2927 api doc generation fails under out of source build.

5 years agoMerge pull request #2926 from tenforward/japanese
Christian Brauner [Sat, 6 Apr 2019 05:21:03 +0000 (07:21 +0200)]
Merge pull request #2926 from tenforward/japanese

doc: update Japanese lxc-user-nic manpage

5 years agofix: #2927 api doc generation fails under out of source build.
yosukesan [Sat, 6 Apr 2019 03:42:41 +0000 (12:42 +0900)]
fix: #2927 api doc generation fails under out of source build.

Signed-off-by: yosukesan <y.otsuki30@gmail.com>
5 years agodoc: update Japanese lxc-user-nic manpage
KATOH Yasufumi [Fri, 5 Apr 2019 17:00:53 +0000 (02:00 +0900)]
doc: update Japanese lxc-user-nic manpage

Update for commit db74bbd

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #2924 from brauner/2019-04-05/lxc_user_nice_update
Stéphane Graber [Fri, 5 Apr 2019 16:32:39 +0000 (12:32 -0400)]
Merge pull request #2924 from brauner/2019-04-05/lxc_user_nice_update

lxc-user-nic: update

5 years agolxc-user-nic: validate request
Christian Brauner [Fri, 5 Apr 2019 12:11:43 +0000 (14:11 +0200)]
lxc-user-nic: validate request

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
5 years agodoc: update lxc-user-nic manpage
Christian Brauner [Fri, 5 Apr 2019 12:01:12 +0000 (14:01 +0200)]
doc: update lxc-user-nic manpage

Closes #1823.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
5 years agolxc-user-nic: small tweaks
Christian Brauner [Fri, 5 Apr 2019 11:30:28 +0000 (13:30 +0200)]
lxc-user-nic: small tweaks

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
5 years agoMerge pull request #2923 from flx42/more-pdeathsig-fixes
Christian Brauner [Thu, 4 Apr 2019 14:50:41 +0000 (16:50 +0200)]
Merge pull request #2923 from flx42/more-pdeathsig-fixes

More pdeathsig fixes

5 years agoFix monitor pdeathsig handling
Felix Abecassis [Thu, 4 Apr 2019 04:12:38 +0000 (21:12 -0700)]
Fix monitor pdeathsig handling

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoFix user namespace pdeathsig handling
Felix Abecassis [Thu, 4 Apr 2019 04:09:53 +0000 (21:09 -0700)]
Fix user namespace pdeathsig handling

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2922 from brauner/2019-04-02/ovs_fixes
Stéphane Graber [Wed, 3 Apr 2019 03:08:12 +0000 (23:08 -0400)]
Merge pull request #2922 from brauner/2019-04-02/ovs_fixes

network: fix network device removal

5 years agonetwork: fix network device removal
Christian Brauner [Tue, 2 Apr 2019 21:26:59 +0000 (23:26 +0200)]
network: fix network device removal

Closes #2849.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2920 from tenforward/update_docs
Christian Brauner [Wed, 27 Mar 2019 14:13:46 +0000 (07:13 -0700)]
Merge pull request #2920 from tenforward/update_docs

Update docs

5 years agodoc: Add the description of apparmor profile generation to man pages
KATOH Yasufumi [Wed, 27 Mar 2019 07:56:20 +0000 (16:56 +0900)]
doc: Add the description of apparmor profile generation to man pages

Only add to English and Japanese man pages.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agodoc: Add lxc.rootfs.managed to lxc.container.conf(5)
KATOH Yasufumi [Wed, 27 Mar 2019 07:52:53 +0000 (16:52 +0900)]
doc: Add lxc.rootfs.managed to lxc.container.conf(5)

Only add to English and Japanese man pages.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agodoc: Add lxc.cgroup.relative to lxc.container.conf(5)
KATOH Yasufumi [Wed, 27 Mar 2019 06:53:17 +0000 (15:53 +0900)]
doc: Add lxc.cgroup.relative to lxc.container.conf(5)

Only English and Japanese man pages.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #2911 from tomponline/tp-2019-03-19/lvcreate
Christian Brauner [Wed, 27 Mar 2019 01:09:33 +0000 (18:09 -0700)]
Merge pull request #2911 from tomponline/tp-2019-03-19/lvcreate

lvm: Updates lvcreate to wipe signatures if supported

5 years agoMerge pull request #2910 from tomponline/tp-2019-03-19/travis
Christian Brauner [Tue, 26 Mar 2019 11:32:14 +0000 (04:32 -0700)]
Merge pull request #2910 from tomponline/tp-2019-03-19/travis

Travis: Adds -Wall and -Werror cflags flags to automatic build.

5 years agolvm: Updates lvcreate to wipe signatures if supported, fallbacks to old command if...
tomponline [Tue, 19 Mar 2019 18:14:25 +0000 (18:14 +0000)]
lvm: Updates lvcreate to wipe signatures if supported, fallbacks to old command if not.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoMerge pull request #2917 from tych0/check-init-pid-failures
Christian Brauner [Mon, 25 Mar 2019 19:55:56 +0000 (12:55 -0700)]
Merge pull request #2917 from tych0/check-init-pid-failures

lxccontainer: check do_lxcapi_init_pid() for failure

5 years agolxccontainer: check do_lxcapi_init_pid() for failure
Tycho Andersen [Mon, 25 Mar 2019 18:08:02 +0000 (12:08 -0600)]
lxccontainer: check do_lxcapi_init_pid() for failure

This function can fail, because it uses the command API. If it does fail,
we get weird errors about not being able to open strange proc paths:

xc authyldapservice-c8020e20-e203-e852-90ef-4d378e8d1444 20190323163231.386 ERROR    lxc_utils - utils.c:switch_to_ns:1184 - No such file or directory - failed to open /proc/-104/ns/net

So let's check for errors before then.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
5 years agotravis: Attempt to fix src/lxc/cmd/lxc_init.c:251: undefined reference to `pthread_si...
tomponline [Tue, 19 Mar 2019 13:38:55 +0000 (13:38 +0000)]
travis: Attempt to fix src/lxc/cmd/lxc_init.c:251: undefined reference to `pthread_sigmask

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoattach: Adds ATTR_UNUSED to fd variable assignment to avoid clang unused variable...
tomponline [Tue, 19 Mar 2019 12:28:46 +0000 (12:28 +0000)]
attach: Adds ATTR_UNUSED to fd variable assignment to avoid clang unused variable warnings.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoTravis: Adds -Wall and -Werror gcc flags to automatic build.
tomponline [Tue, 19 Mar 2019 11:40:47 +0000 (11:40 +0000)]
Travis: Adds -Wall and -Werror gcc flags to automatic build.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoMerge pull request #2907 from brauner/2019-03-12/asan_support
Stéphane Graber [Tue, 12 Mar 2019 23:49:54 +0000 (19:49 -0400)]
Merge pull request #2907 from brauner/2019-03-12/asan_support

hardening: enable address sanitizer build

5 years agohardening: enable address sanitizer build
Christian Brauner [Tue, 12 Mar 2019 19:58:09 +0000 (20:58 +0100)]
hardening: enable address sanitizer build

This adds --{disable,enable}-asan. It is disabled by default.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2903 from flx42/fix-pid-namespace-pdeathsig-handling
Christian Brauner [Tue, 12 Mar 2019 09:38:15 +0000 (10:38 +0100)]
Merge pull request #2903 from flx42/fix-pid-namespace-pdeathsig-handling

Fix PID namespace pdeathsig handling

5 years agostart: fix parent PID passed to lxc_set_death_signal
Felix Abecassis [Tue, 12 Mar 2019 00:15:45 +0000 (17:15 -0700)]
start: fix parent PID passed to lxc_set_death_signal

Fixes: #2902
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoutils: fix handling of PID namespaces in lxc_set_death_signal
Felix Abecassis [Tue, 12 Mar 2019 00:13:48 +0000 (17:13 -0700)]
utils: fix handling of PID namespaces in lxc_set_death_signal

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2901 from brauner/2019-03-11/compiler_flags
Stéphane Graber [Mon, 11 Mar 2019 23:39:03 +0000 (19:39 -0400)]
Merge pull request #2901 from brauner/2019-03-11/compiler_flags

compiler: hardening

5 years agocompiler: -fexceptions hardening
Christian Brauner [Mon, 11 Mar 2019 22:36:02 +0000 (23:36 +0100)]
compiler: -fexceptions hardening

This hardens multi-threaded C. Without it, the implementation of thread
cancellation handlers (introduced by pthread_cleanup_push) uses a completely
unprotected function pointer on the stack. This function pointer can simplify
the exploitation of stack-based buffer overflows even if the thread in question
is never canceled.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocompiler: -pipe
Christian Brauner [Mon, 11 Mar 2019 22:34:01 +0000 (23:34 +0100)]
compiler: -pipe

Avoid temporary files, speeding up builds.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocompiler: -fasynchronous-unwind-tables hardening
Christian Brauner [Mon, 11 Mar 2019 22:30:41 +0000 (23:30 +0100)]
compiler: -fasynchronous-unwind-tables hardening

Increased reliability of backtraces.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2900 from brauner/2019-03-11/2826
Stéphane Graber [Mon, 11 Mar 2019 14:55:02 +0000 (10:55 -0400)]
Merge pull request #2900 from brauner/2019-03-11/2826

btrfs: ensure \0 byte at end

5 years agobtrfs: ensure \0 byte at end
Christian Brauner [Mon, 11 Mar 2019 11:47:23 +0000 (12:47 +0100)]
btrfs: ensure \0 byte at end

Apparently the name received from the tree walk is not guaranteed to have \0
byte at the end. So let's make sure we append one.
Note that this is only an issue if there are any subvolumes in the container's
rootfs.

Closes 2826.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2898 from brauner/2019-03-10/fix_post_stop_hooks
Stéphane Graber [Mon, 11 Mar 2019 00:52:35 +0000 (20:52 -0400)]
Merge pull request #2898 from brauner/2019-03-10/fix_post_stop_hooks

hooks: drop namespace references before post-stop

5 years agohooks: drop namespace references before post-stop
Christian Brauner [Sun, 10 Mar 2019 10:46:18 +0000 (11:46 +0100)]
hooks: drop namespace references before post-stop

Callers such as LXD run post-stop hooks to perform cleanup operations on
shutdown. This can involve umount and other things. To avoid surprises with
lingering namespace references we should close all our namespace-preserving
file descriptors. We don't need them at this point anymore anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2897 from TheSeven/master
Christian Brauner [Wed, 6 Mar 2019 23:26:34 +0000 (00:26 +0100)]
Merge pull request #2897 from TheSeven/master

Fix lxc.cgroup2.<controller> on cgroup2-only systems

5 years agoFix lxc.cgroup2.<controller> on cgroup2-only systems
Michael Sparmann [Wed, 6 Mar 2019 23:06:11 +0000 (00:06 +0100)]
Fix lxc.cgroup2.<controller> on cgroup2-only systems

Signed-off-by: Michael Sparmann <theseven@gmx.net>
5 years agoMerge pull request #2896 from brauner/lxc/master
Stéphane Graber [Tue, 5 Mar 2019 18:42:54 +0000 (13:42 -0500)]
Merge pull request #2896 from brauner/lxc/master

conf: avoid compiler warning

5 years agoconf: avoid compiler warning
Christian Brauner [Tue, 5 Mar 2019 18:29:38 +0000 (19:29 +0100)]
conf: avoid compiler warning

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoRevert "conf: Fixes unitialised variable."
Christian Brauner [Tue, 5 Mar 2019 18:28:52 +0000 (19:28 +0100)]
Revert "conf: Fixes unitialised variable."

This reverts commit 912c4bb474b52284cf82c336b0af161be6c25ac1.

I accidently merged this commit. The initialization is wrong.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2895 from tomponline/tp-2019-03-05/minor-fix
Christian Brauner [Tue, 5 Mar 2019 18:27:32 +0000 (19:27 +0100)]
Merge pull request #2895 from tomponline/tp-2019-03-05/minor-fix

conf: Fixes uninitialised variable.

> @brauner clang is failing but gcc passes, would it be OK to initialise this to 0?

He, unfortunately not. :)
What would happen now is that you'd close `stdin` on a standard system. What you'd want is `= -EBADF`. :)

5 years agoconf: Fixes unitialised variable.
tomponline [Tue, 5 Mar 2019 16:56:42 +0000 (16:56 +0000)]
conf: Fixes unitialised variable.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoMerge pull request #2893 from brauner/2019-03-04/minor_tweaks
Stéphane Graber [Tue, 5 Mar 2019 01:45:46 +0000 (02:45 +0100)]
Merge pull request #2893 from brauner/2019-03-04/minor_tweaks

minor tweaks

5 years agoconfile: make parse_limit_value() static
Christian Brauner [Mon, 4 Mar 2019 19:31:52 +0000 (20:31 +0100)]
confile: make parse_limit_value() static

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile_utils: make update_hwaddr() static
Christian Brauner [Mon, 4 Mar 2019 19:30:41 +0000 (20:30 +0100)]
confile_utils: make update_hwaddr() static

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile_utils: lxc_config_net_is_hwaddr()
Christian Brauner [Mon, 4 Mar 2019 19:26:33 +0000 (20:26 +0100)]
confile_utils: lxc_config_net_is_hwaddr()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2891 from brauner/2019-03-03/update_license_headers
Stéphane Graber [Mon, 4 Mar 2019 18:13:24 +0000 (19:13 +0100)]
Merge pull request #2891 from brauner/2019-03-03/update_license_headers

tree-wide: fix wrong licensing

5 years agoMerge pull request #2884 from brauner/2019-03-01/kill_fgets
Serge Hallyn [Mon, 4 Mar 2019 15:19:07 +0000 (09:19 -0600)]
Merge pull request #2884 from brauner/2019-03-01/kill_fgets

tree-wide: kill fgets()

5 years agoMerge pull request #2889 from tomponline/tp-2019-03-02/bugfixes
Christian Brauner [Mon, 4 Mar 2019 09:36:30 +0000 (10:36 +0100)]
Merge pull request #2889 from tomponline/tp-2019-03-02/bugfixes

gcc -Wall flag compat

5 years agocmd: shut up gcc.
tomponline [Mon, 4 Mar 2019 08:37:16 +0000 (08:37 +0000)]
cmd: shut up gcc.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agostorage: shut up gcc and remove unused variables.
tomponline [Mon, 4 Mar 2019 08:33:51 +0000 (08:33 +0000)]
storage: shut up gcc and remove unused variables.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agostart: shut up gcc.
tomponline [Mon, 4 Mar 2019 08:27:59 +0000 (08:27 +0000)]
start: shut up gcc.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agomonitor: shut up gcc.
tomponline [Mon, 4 Mar 2019 08:25:42 +0000 (08:25 +0000)]
monitor: shut up gcc.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agonetwork: shut up gcc.
tomponline [Mon, 4 Mar 2019 08:23:39 +0000 (08:23 +0000)]
network: shut up gcc.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agolxccontainer: shut up gcc and remove unused variables.
tomponline [Mon, 4 Mar 2019 08:20:59 +0000 (08:20 +0000)]
lxccontainer: shut up gcc and remove unused variables.

Closes #2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agocgroups: shut up gcc
tomponline [Mon, 4 Mar 2019 08:09:57 +0000 (08:09 +0000)]
cgroups: shut up gcc

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agocgroups: remove unused variables
tomponline [Sat, 2 Mar 2019 10:18:18 +0000 (10:18 +0000)]
cgroups: remove unused variables

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoattacg: shut up gcc
tomponline [Sat, 2 Mar 2019 10:14:32 +0000 (10:14 +0000)]
attacg: shut up gcc

Invalid warning but let's please the compiler.

Closes lxc#2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agoattach: remove unused variable
tomponline [Sat, 2 Mar 2019 10:11:51 +0000 (10:11 +0000)]
attach: remove unused variable

Closes lxc#2885.

Signed-off-by: tomponline <tomp@tomp.uk>
5 years agostring_utils.c: fix wrong licensing
Christian Brauner [Sun, 3 Mar 2019 13:16:31 +0000 (14:16 +0100)]
string_utils.c: fix wrong licensing

liblxc has always been meant to be LGPLv2.1+ as reflected by the many
downstreams projects and bindings which are themselves under LGPLv2.1+ or other
licenses which would be incompatible with linking against a GPLv2+ library.

It's pretty normal for a library to be LGPL while binaries are GPL as a GPL
library would only ever be usable by other GPL-only projects, which isn't the
case for very many of the liblxc downstreams.

The issue here is really carelessness. None of those GPL headers were put there
intentionally, instead being wrongly copy/pasted from other parts of the
codebase which is indeed intended to be GPLv2+. This is also made clear in our
CONTRIBUTING file in this repository:

Licensing for new files:
------------------------

LXC is made of files shipped under a few different licenses.

Anything that ends up being part of the LXC library needs to be released
under LGPLv2.1+ or a license compatible with it (though the latter will
only be accepted for cases where the code originated elsewhere and was
imported into LXC).

Language bindings for the libraries need to be released under LGPLv2.1+.

Anything else (non-libraries) needs to be Free Software and needs to be
allowed to link with LGPLv2.1+ code (if needed). LXC upstream prefers
LGPLv2.1+ or GPLv2 for those.

When introducing a new file into the project, please make sure it has a
copyright header making clear under which license it's being released
and if it doesn't match the criteria described above, please explain
your decision on the lxc-devel mailing-list when submitting your patch.

This is intended to switch over files to LGPLv2.1+ to which end we have
collected ACKs from relevant people.
/* Affected People */
Christian Brauner <christian.brauner@ubuntu.com>
Donghwa Jeong <dh48.jeong@samsung.com>

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Donghwa Jeong <dh48.jeong@samsung.com>
5 years agofile_utils.c: fix wrong licensing
Christian Brauner [Sun, 3 Mar 2019 13:15:04 +0000 (14:15 +0100)]
file_utils.c: fix wrong licensing

liblxc has always been meant to be LGPLv2.1+ as reflected by the many
downstreams projects and bindings which are themselves under LGPLv2.1+ or other
licenses which would be incompatible with linking against a GPLv2+ library.

It's pretty normal for a library to be LGPL while binaries are GPL as a GPL
library would only ever be usable by other GPL-only projects, which isn't the
case for very many of the liblxc downstreams.

The issue here is really carelessness. None of those GPL headers were put there
intentionally, instead being wrongly copy/pasted from other parts of the
codebase which is indeed intended to be GPLv2+. This is also made clear in our
CONTRIBUTING file in this repository:

Licensing for new files:
------------------------

LXC is made of files shipped under a few different licenses.

Anything that ends up being part of the LXC library needs to be released
under LGPLv2.1+ or a license compatible with it (though the latter will
only be accepted for cases where the code originated elsewhere and was
imported into LXC).

Language bindings for the libraries need to be released under LGPLv2.1+.

Anything else (non-libraries) needs to be Free Software and needs to be
allowed to link with LGPLv2.1+ code (if needed). LXC upstream prefers
LGPLv2.1+ or GPLv2 for those.

When introducing a new file into the project, please make sure it has a
copyright header making clear under which license it's being released
and if it doesn't match the criteria described above, please explain
your decision on the lxc-devel mailing-list when submitting your patch.

This is intended to switch over files to LGPLv2.1+ to which end we have
collected ACKs from relevant people.
/* Affected People */
Christian Brauner <christian.brauner@ubuntu.com>
Donghwa Jeong <dh48.jeong@samsung.com>

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Donghwa Jeong <dh48.jeong@samsung.com>
5 years agocommands_utils.h: fix wrong licensing
Christian Brauner [Sun, 3 Mar 2019 13:18:41 +0000 (14:18 +0100)]
commands_utils.h: fix wrong licensing

liblxc has always been meant to be LGPLv2.1+ as reflected by the many
downstreams projects and bindings which are themselves under LGPLv2.1+ or other
licenses which would be incompatible with linking against a GPLv2+ library.

It's pretty normal for a library to be LGPL while binaries are GPL as a GPL
library would only ever be usable by other GPL-only projects, which isn't the
case for very many of the liblxc downstreams.

The issue here is really carelessness. None of those GPL headers were put there
intentionally, instead being wrongly copy/pasted from other parts of the
codebase which is indeed intended to be GPLv2+. This is also made clear in our
CONTRIBUTING file in this repository:

Licensing for new files:
------------------------

LXC is made of files shipped under a few different licenses.

Anything that ends up being part of the LXC library needs to be released
under LGPLv2.1+ or a license compatible with it (though the latter will
only be accepted for cases where the code originated elsewhere and was
imported into LXC).

Language bindings for the libraries need to be released under LGPLv2.1+.

Anything else (non-libraries) needs to be Free Software and needs to be
allowed to link with LGPLv2.1+ code (if needed). LXC upstream prefers
LGPLv2.1+ or GPLv2 for those.

When introducing a new file into the project, please make sure it has a
copyright header making clear under which license it's being released
and if it doesn't match the criteria described above, please explain
your decision on the lxc-devel mailing-list when submitting your patch.

This is intended to switch over files to LGPLv2.1+ to which end we have
collected ACKs from relevant people.
/* Affected People */
Christian Brauner <christian.brauner@ubuntu.com>
Donghwa Jeong <dh48.jeong@samsung.com>

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Donghwa Jeong <dh48.jeong@samsung.com>
5 years agocommands_utils.c: fix wrong licensing
Christian Brauner [Sun, 3 Mar 2019 13:11:55 +0000 (14:11 +0100)]
commands_utils.c: fix wrong licensing

liblxc has always been meant to be LGPLv2.1+ as reflected by the many
downstreams projects and bindings which are themselves under LGPLv2.1+ or other
licenses which would be incompatible with linking against a GPLv2+ library.

It's pretty normal for a library to be LGPL while binaries are GPL as a GPL
library would only ever be usable by other GPL-only projects, which isn't the
case for very many of the liblxc downstreams.

The issue here is really carelessness. None of those GPL headers were put there
intentionally, instead being wrongly copy/pasted from other parts of the
codebase which is indeed intended to be GPLv2+. This is also made clear in our
CONTRIBUTING file in this repository:

Licensing for new files:
------------------------

LXC is made of files shipped under a few different licenses.

Anything that ends up being part of the LXC library needs to be released
under LGPLv2.1+ or a license compatible with it (though the latter will
only be accepted for cases where the code originated elsewhere and was
imported into LXC).

Language bindings for the libraries need to be released under LGPLv2.1+.

Anything else (non-libraries) needs to be Free Software and needs to be
allowed to link with LGPLv2.1+ code (if needed). LXC upstream prefers
LGPLv2.1+ or GPLv2 for those.

When introducing a new file into the project, please make sure it has a
copyright header making clear under which license it's being released
and if it doesn't match the criteria described above, please explain
your decision on the lxc-devel mailing-list when submitting your patch.

This is intended to switch over files to LGPLv2.1+ to which end we have
collected ACKs from relevant people.
/* Affected People */
Christian Brauner <christian.brauner@ubuntu.com>
Donghwa Jeong <dh48.jeong@samsung.com>

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Donghwa Jeong <dh48.jeong@samsung.com>