Commit Graph

6267 Commits

Author SHA1 Message Date
Stéphane Graber
cfeeed1984
Merge pull request #1994 from brauner/2017-12-04/bugfixes
attach: do not fail on non-existing namespaces
2017-12-05 23:02:59 -08:00
Stéphane Graber
1048874c00
Merge pull request #1996 from brauner/2017-12-04/reenable_coverity_scan
test: Coverity scan integration
2017-12-05 23:01:11 -08:00
Stéphane Graber
a9c51a8267
Merge pull request #2004 from brauner/2017-12-06/fix_log_env_variable
start: set loglevel correctly
2017-12-05 22:59:38 -08:00
Christian Brauner
4a03ded4b2
start: set loglevel correctly
We want the loglevel that the user specified when starting the container
because it overrides the default one set in the config.

Closes #2003.

Reported-by: Felix Abecassis <fabecassis@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-06 00:21:05 +01:00
RicardoSanchezA
a144d28830
arguments: move to tools/ subdirectory
The arguments.{c,h} file should not be a part of liblxc itself. It should only
be used for the lxc tools.

Signed-off-by: RicardoSanchezA <ricardo.sanchez@utexas.edu>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-05 12:15:09 +01:00
Christian Brauner
b10fdf6b71
Merge pull request #2002 from tenforward/japanese
Add lxc.console.*, lxc.namespace.*, and lxc.init.cwd to Japanese lxc.container.conf(5)
2017-12-05 11:55:58 +01:00
KATOH Yasufumi
3f6b1110c9 doc: Add lxc.init.cwd to Japanese lxc.container.conf(5)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2017-12-05 17:23:29 +09:00
KATOH Yasufumi
615e68b2e5 doc: Add lxc.namespace.[namespace identifier] to Japanese lxc.container.conf(5)
and fix the description of namespace inheritance

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2017-12-05 17:08:52 +09:00
KATOH Yasufumi
4d94eb7d6b doc: Add lxc.console.buffer.* and lxc.console.rotate to Japanese lxc.container.conf(5)
and update the description of lxc.console.logfile

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2017-12-05 16:22:37 +09:00
Christian Brauner
2f216e7341
Merge pull request #1992 from lifeng68/add_init_cwd
confile:add lxc.init.cwd
2017-12-05 05:53:23 +01:00
LiFeng
3c4915534d confile:add lxc.init.cwd
Signed-off-by: LiFeng <lifeng68@huawei.com>
2017-12-05 04:18:07 -05:00
Christian Brauner
4fe9a9b710
Merge pull request #2000 from hallyn/2017-12-04/execargs
lxc_execute: properly figure out number of needed arguments
2017-12-05 05:50:47 +01:00
Serge Hallyn
858faf70ab 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>
2017-12-04 22:30:26 -06:00
Christian Brauner
98db3207f6
test: reenable Coverity integration
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-05 02:13:22 +01:00
Christian Brauner
134284c3ff
attach: do not fail on non-existing namespaces
Closes #1993.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 12:26:55 +01:00
Christian Brauner
68eeee2f47
Merge pull request #1979 from marcosps/issue_494
lxc_unshare: Add uid_mapping when creating userns
2017-12-04 12:10:22 +01:00
Stéphane Graber
7ded3c1878
Merge pull request #1988 from abbasally5/feature-improve-bash-completion-1236
Add bash completion to list backing store types for lxc-create -B
2017-12-03 23:57:43 -08:00
Stéphane Graber
152c980061
Merge pull request #1989 from p-l-/fix-lxc-checkconfig
Fix lxc-checkconfig output
2017-12-03 23:57:19 -08:00
Stéphane Graber
331ae3a2a3
Merge pull request #1981 from brauner/2017-12-01/fix_android_sethostname
utils: declare sethostname() static inline
2017-12-03 23:56:07 -08:00
Christian Brauner
223e30c169
criu: silence static analysis
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 01:48:46 +01:00
Christian Brauner
1ca0ee1129
confile: remove dead assignment
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 01:44:45 +01:00
Christian Brauner
113ebd5729
criu: initialize status
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 01:41:49 +01:00
Christian Brauner
f39bcb70cf
confile_legacy: prevent null pointer deref
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 01:38:01 +01:00
Christian Brauner
0103eb53de
conf: prevent null pointer dereference
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-04 01:34:50 +01:00
Pierre LALET
edf3320cad Insert missing "echo" after "is_enabled"
Signed-off-by: Pierre LALET <pierre.lalet@cea.fr>
2017-12-03 12:33:19 +01:00
Pierre LALET
6f39c2a8a7 Fix SETCOLOR_FAILURE evaluation
Signed-off-by: Pierre LALET <pierre.lalet@cea.fr>
2017-12-03 11:32:12 +01:00
Abbas Ally
caba109477 Add bash completion to list backing store types for lxc-create -B
- Backing Store types are hard-coded (Not sure how to get programmatically)
- Closes #1236

Signed-off-by: Abbas Ally <abbasally5@yahoo.com>
2017-12-03 05:51:44 +00:00
Christian Brauner
810c42ac64
Merge pull request #1984 from CC-Hsu/patch-1
Add new dependency to Slackware template
2017-12-02 13:00:36 +01:00
CC-Hsu
824d600fc1
Add new dependency to Slackware template
I followed the [changelog of Slackware-current]<http://www.slackware.com/changelog/>,
and found that Slackware-current split hostname utility from util-linux package in Nov 17 2017.
So I add the new package to the template.

Signed-off-by: Chia-Chun Hsu <a12321aabb@gmail.com>
2017-12-02 19:27:34 +08:00
Christian Brauner
2dcc34f3a4
Merge pull request #1983 from iDarkTemplar/update_template
Update gentoo.moresecure.conf.
2017-12-02 09:10:56 +01:00
i.Dark_Templar
23002e923e
Update gentoo.moresecure.conf.
Closes https://github.com/lxc/lxc/issues/1928

Signed-off-by: i.Dark_Templar <darktemplar@dark-templar-archives.net>
2017-12-02 10:33:51 +03:00
Marcos Paulo de Souza
344c9d813c lxc_unshare: Add uid_mapping when creating userns
Change conf.c to export function write_id_mapping, which will now be
called inside main function of lxc_unshare.c.

This is required because setuid syscalls only permits a new userns to
set a new uid if the uid of parameter is mapped inside the ns using
uid_map file[1]. So, just after the clone invocation, map the uid passed as
parameter into the newly created user namespace, and put the current uid
as the ID-outside-ns. After the mapping is done, setuid call succeeds.

Closes: #494

[1] https://elixir.free-electrons.com/linux/latest/source/kernel/user_namespace.c#L286

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2017-12-01 20:28:55 -02:00
Christian Brauner
2650fb4d5e
utils: declare sethostname() static inline
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-12-01 23:18:09 +01:00
Serge Hallyn
33349a049f
Merge pull request #1980 from flx42/lxc-oci-layer-caching
OCI layer caching + misc fixes
2017-12-01 13:50:11 -06:00
Felix Abecassis
52e31c07c8 lxc-oci: support skopeo layer caching
This requires skopeo version 0.1.25

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-12-01 11:04:34 -08:00
Felix Abecassis
0fd2b67972 lxc-oci: support index files with multiple manifests
Previously, the output would contain "null" strings in this case.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-30 22:51:57 -08:00
Felix Abecassis
ca1280fea4 lxc-oci: rely on jq instead of sed to transform values
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-30 22:51:53 -08:00
Felix Abecassis
4b42266dc6 lxc-oci: remove unhelpful comment
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-30 22:51:47 -08:00
Felix Abecassis
81e38b0059 lxc-oci: cleanup temporary download directory if umoci is interrupted
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-30 22:51:38 -08:00
Christian Brauner
6370793188
Merge pull request #1955 from flx42/confile-fix-misc-issues
Fix errors in configuration file parsing
2017-11-29 12:41:39 +01:00
Felix Abecassis
44047b2b20 confile_utils: simplify lxc_config_net_hwaddr
In addition to the memory corruption fixed in ee3e84df78,
this function was also performing invalid memory accesses for the following inputs:
- `lxc.net`
- `lxc.net.`
- `lxc.net.0.`
- `lxc.network`
- `lxc.network.0.`

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-28 20:41:51 -08:00
Felix Abecassis
24fa7df6f1 confile: error out if a network configuration key has no subkey
This prevent an infinite recursion in the case of "lxc.net.0. = a"

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-28 20:41:51 -08:00
Felix Abecassis
26e92b0eab log: fix infinite loop with multiple lxc.log.syslog keys
This caused the linked list of appenders to loop on itself, creating
an infinite logging loop in `__lxc_log_append`.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-28 20:41:51 -08:00
Felix Abecassis
8bc6d5393c tests: add a function for negative netdev tests
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-28 20:40:45 -08:00
Felix Abecassis
327500d449 confile: fix memory leak
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2017-11-28 20:27: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
Christian Brauner
29a012480d
Merge pull request #1958 from AustinReichert/tools-refactor-lxc-wait
tools/lxc_wait: removed internal logging
2017-11-29 02:32:35 +01:00
Christian Brauner
8410ae3d63
Merge pull request #1959 from AustinReichert/tools-refactor-lxc-usernsexec
tools/lxc_usernsexec: removed internal logging
2017-11-29 02:15:04 +01:00
Christian Brauner
c8947ca72e
Merge pull request #1960 from AustinReichert/tools-refactor-lxc-unfreeze
tools/lxc_unfreeze: removed internal logging
2017-11-29 02:03:01 +01:00
Christian Brauner
fdc50b06f8
Merge pull request #1961 from AustinReichert/tools-refactor-lxc-top
tools/lxc_top: removed internal logging
2017-11-29 02:01:30 +01:00