Commit Graph

364 Commits

Author SHA1 Message Date
Christian Brauner
9a5e7ac4a9
include: add strlcat() implementation
CC: Donghwa Jeong <dh48.jeong@samsung.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-20 13:44:02 +02:00
Christian Brauner
477e62b618
include: add getgrgid_r()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-15 11:39:23 +02:00
Christian Brauner
91c272a571
strlcpy: add strlcpy() implementation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-05-11 13:32:01 +02:00
Fabrice Fontaine
49bc916b1d Fix compilation with static libcap and shared gnutls
Commit c06ed219c4 has broken
compilation with a static libcap and a shared gnutls.
This results in a build failure on init_lxc_static if gnutls is
a shared library as init_lxc_static is built with -all-static option
(see src/lxc/Makefile.am) and AC_CHECK_LIB adds gnutls to LIBS.

This commit fix the issue by removing default behavior of AC_CHECK_LIB
and handling manually GNUTLS_LIBS and HAVE_LIBGNUTLS

Fixes:
 - http://autobuild.buildroot.net/results/b655d6853c25a195df28d91512b3ffb6c654fc90

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-04-07 18:12:12 +02:00
Stéphane Graber
5b66b6ee3e
Release LXC 3.0.0
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 21:49:16 -04:00
Stéphane Graber
b195038dfc
configure.ac: Support redhatenterpriseserver
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-27 15:21:51 -04:00
Stéphane Graber
769cf3c1cc
Release LXC 3.0.0.beta4
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-26 23:38:01 -04:00
Stéphane Graber
b53a26168c
Release LXC 3.0.0.beta3
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-23 16:22:00 -04:00
Stéphane Graber
14f16c4171
Release LXC 3.0.0.beta2
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-19 16:05:53 -04:00
Stéphane Graber
282753c6c9
Release LXC 3.0.0.beta1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-01 13:59:24 -05:00
Christian Brauner
aafb5ea2a8
tree-wide: rm templates in favor of distrobuilder
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:34 +01:00
Christian Brauner
98619a7362
autotools: remove --enable-deprecated
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:34 +01:00
Christian Brauner
e144a06bd7
tree-wide: remove python3 bindings
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
b52a5bef6f
tree-wide: remove lua bindings
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
a9145d622f
tree-wide: cleanup
- remove legacy binaries
- conditionalize creation of docs and tests for the command line tools and the
  shared library helper commands

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:33 +01:00
Christian Brauner
8d0609371e
autotools: add --{enable,disable}-{commands,tools}
This allows users to only compile the shared libray without having to compile
any of the command line tools or command helpers for the shared library.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-28 10:05:30 +01:00
Stéphane Graber
d4feae43a6
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
configure: add --enable-pam
2018-02-26 12:11:13 -05:00
Christian Brauner
f7a8609fab
configure: add --enable-pam
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:27:46 +01:00
Christian Brauner
35444f3827
templates: add lxc-local template
Closes #2184.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:22:48 +01:00
Christian Brauner
7ac43d3d21
Revert "Revert "pam: create writable cgroups for unpriv users""
This reverts commit 79cf25e826.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:01:18 +01:00
Stéphane Graber
79cf25e826
Revert "pam: create writable cgroups for unpriv users"
This reverts commit 7995662124.

Before we can merge something like this we need to have it be behind a
configure flag and quite probably be an opt-in feature (--enable-pam).

This should fix Jenkins, PPA builds and the current binary conflicts
between the lxcfs and lxc package builds (snap and archive).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-02-21 17:25:58 -05:00
Serge Hallyn
e235f961bf
Merge pull request #2148 from brauner/2018-02-09/move_pam_module_to_liblxc
pam: create writable cgroups for unpriv users
2018-02-21 13:27:59 -06:00
Christian Brauner
0e7ff52c92
tree-wide: remove cgmanager
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-13 05:39:58 +01:00
Christian Brauner
7995662124
pam: create writable cgroups for unpriv users
This moves pam_cgfs from the LXCFS repo into the LXC repo. This will allow us
to share a bunch of code between the cgroup backends and the pam module. The
next step obviously is to share code.

Closes #1307.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-09 14:39:43 +01:00
Christian Brauner
6a342cab36
cmd: move lxc-update-config
Closes #2073.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
48b1dc4cdc
cmd: move lxc-checkconfig
Closes #2073.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:32 +01:00
Christian Brauner
05f0f93a93
autotools: do not link against libapparmor
Since we write the label directly without going through the AppArmor API it
doesn't make sense to link against it.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-01-22 12:14:21 +01:00
Stéphane Graber
5f98011c3e
Include -devel suffix in version string
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-01-05 16:25:28 -05:00
Serge Hallyn
c06ed219c4 configure.ac: fix the check for static libcap
The existing check doesn't work, because when you statically
link a program against libc, any functions not called are not
included.  So cap_init() which we check for is not there in
the built binary.

So instead just check whether a "gcc -lcap -static" works.
If libcap.a is not available it will fail, if it is it will
succeed.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2018-01-03 21:09:10 -06:00
Jonathan Calmels
1689c7cf90 lxc-oci: read configuration from oci.common.conf if available
Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
2017-12-19 15:18:28 -08:00
Jonathan Calmels
84bf5645ed hooks: dhclient hook improvements
- Merge dhclient-start and dhclient-stop into a single hook.
- Wait for a lease before returning from the hook.
- Generate a logfile when LXC log level is either DEBUG or TRACE.
- Rely on namespace file descriptors for the stop hook.
- Use settings from /<sysconf>/lxc/dhclient.conf if available.
- Attempt to cleanup if dhclient fails to shutdown properly.

Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
2017-12-19 15:18:28 -08:00
Serge Hallyn
242146d9e4
Merge pull request #1932 from 3XX0/dhclient-hook
hooks: add dhclient hooks
2017-11-28 20:16:50 -06:00
Marcos Paulo de Souza
a81c46e99a Use AX_PTHREAD config script to detect pthread api
Closes: #84

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2017-11-26 16:45:22 -02:00
Jonathan Calmels
27234deb3a hooks: add dhclient hooks
Add new hooks leveraging dhclient from the host to automatically
configure the container interfaces. This is especially useful for
application containers which rely on an IPAM driver for network
configuration (e.g. Docker).

Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
2017-11-20 16:54:16 -08:00
Fabrice Fontaine
f48b5fd8ab Fix compilation on toolchain without prlimit
Some toolchains which are not bionic like uclibc does not support
prlimit or prlimit64. In this case, return an error.
Moreover, if prlimit64 is available, use lxc implementation of prlimit.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-11-02 18:36:00 +01:00
Serge Hallyn
0ef43a5c1d Add OCI container creation template
Closes #1813

This adds preliminary (but working) support for creating application
containers from OCI formats.  Examples:

create a container from a local OCI layout in ../oci:

    sudo lxc-create -t oci -n a1 -- -u oci:../oci:alpine

Or, create a container pulling from the docker hub.

    sudo lxc-create -t oci -n u1 -- -u docker://ubuntu

The url is specified in the same format as for 'skopeo copy'.

Comments appreciated.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2017-10-03 21:45:29 +00:00
KATOH Yasufumi
607a8de552 doc: Translate lxc-update-config(1) into Japanese
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2017-09-25 20:14:57 +09:00
Christian Brauner
0a29a3ef6a
doc: add lxc-update-config manpage
Closes #1818.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-09-19 12:51:43 +02:00
Stéphane Graber
b737ac4c8c
Switch back to development
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2017-09-05 22:32:18 -04:00
Stéphane Graber
e94087c985
change version to 2.1.0 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2017-09-05 22:31:20 -04:00
Christian Brauner
3a12c64d94
configure: remove slash from cgroup pattern
This is the cause of the unnecessary extraneous slashes when creating cgroups.
Our lxc.system.conf page also clearly shows "lxc/%n" as example, not "/lxc%n".

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-30 16:45:45 +02:00
Christian Brauner
555200a6f4
tools: add lxc-update-config.in
This tool can be used to switch from a pre 2.1 to a 2.1 config file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-08-21 17:19:16 +02:00
0x0916
82b479119d Merge ubuntu and debiancase
Signed-off-by: 0x0916 <w@laoqinren.net>
2017-05-11 15:16:14 +08:00
0x0916
234f9815ff Install systemd units for CentOS
Signed-off-by: 0x0916 <w@laoqinren.net>
2017-05-11 15:15:18 +08:00
Christian Brauner
69924fff1b
autotools: check for cap_get_file
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-04-19 01:02:10 +02:00
Christian Brauner
a04f540725
android: add prlimit implementation for 32bit
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-04-15 00:18:31 +02:00
Wolfgang Bumiller
c6d09e15c5 conf: implement resource limits
This adds lxc.limit.<name> options consisting of one or two
colon separated numerical values (soft and optional hard
limit). If only one number is specified it'll be used for
both soft and hard limit. Additionally the word 'unlimited'
can be used instead of numbers.

Eg.
  lxc.limit.nofile = 30000:32768
  lxc.limit.stack = unlimited

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2017-04-11 14:01:11 +02:00
Stéphane Graber
a75c00c6d0 Merge pull request #1371 from ganto/lxc-fedora
Complete rework of lxc-fedora template
2017-02-16 22:12:33 +01:00
Fabrice Fontaine
e37dda7156 Add HAVE_LIBCAP
Currently it is impossible to build lxc with --disable-capabilities if
the user has libcap-dev installed on his system as:
 - calls to cap_xxx functions are not protected by HAVE_LIBCAP defines.
 The whole file is only protected by HAVE_SYS_CAPABILITY_H.
 - AC_CHECK_LIB default action-if-found is overriden by [true] so
 HAVE_LIBCAP is never written to config.h

This patch replaces all HAVE_SYS_CAPABILITY_H checks by HAVE_LIBCAP
checks (fix #1361)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-02-12 14:55:05 +01:00
Geaaru
74e7574120 [lxc-sabayon] Add common scripts for daily image generation.
Signed-off-by: Geaaru <geaaru@gmail.com>
2017-01-29 19:03:55 +01:00