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
Christian Brauner
456e7d7eba
Merge pull request #1962 from AustinReichert/tools-refactor-lxc-stop
...
tools/lxc_stop: removed internal logging
2017-11-29 01:56:36 +01:00
Christian Brauner
7c3545948a
Merge pull request #1963 from AustinReichert/tools-refactor-lxc-start
...
tools/lxc_start: removed internal logging
2017-11-29 01:55:47 +01:00
Christian Brauner
7bb1469d90
Merge pull request #1964 from AustinReichert/tools-refactor-lxc-snapshot
...
tools/lxc_snapshot: removed internal logging
2017-11-29 01:54:47 +01:00
Christian Brauner
b4f5ab1942
Merge pull request #1966 from AustinReichert/tools-refactor-lxc-ls
...
tools/lxc_ls: remove internal logging
2017-11-29 01:54:16 +01:00
Christian Brauner
ca23fb473f
Merge pull request #1965 from AustinReichert/tools-refactor-lxc-monitor
...
tools/lxc_monitor: removed internal logging
2017-11-29 01:53:18 +01:00
Christian Brauner
0fac38afbd
Merge pull request #1967 from AustinReichert/tools-refactor-lxc-info
...
tools/lxc_info: removed internal logging
2017-11-29 01:52:47 +01:00
Christian Brauner
31b800d653
Merge pull request #1968 from AustinReichert/tools-refactor-lxc-freeze
...
tools/lxc_freeze: remove internal logging
2017-11-29 01:52:38 +01:00
Christian Brauner
1e325b760e
Merge pull request #1969 from AustinReichert/tools-refactor-lxc-execute
...
tools/lxc_execute: removed internal logging
2017-11-29 01:50:39 +01:00
Christian Brauner
896a3d4fbb
Merge pull request #1957 from AustinReichert/tools-refactor-lxc-unshare
...
tools/lxc_unshare: removed internal logging
2017-11-29 01:50:07 +01:00
Christian Brauner
0db85c5844
Merge pull request #1970 from AustinReichert/tools-refactor-lxc-device
...
tools/lxc_device: remove internal logging
2017-11-29 01:42:39 +01:00
Christian Brauner
dd9a1c4a5a
Merge pull request #1971 from AustinReichert/tools-refactor-lxc-destroy
...
tools/lxc_destroy: remove internal logging
2017-11-29 01:42:00 +01:00
Christian Brauner
4adf8ff4ba
Merge pull request #1972 from AustinReichert/tools-refactor-lxc-create
...
tools/lxc_create: remove internal logging
2017-11-29 01:41:36 +01:00