]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
6 years agocoverity: #1425742
Christian Brauner [Wed, 6 Dec 2017 20:48:37 +0000 (21:48 +0100)]
coverity: #1425742

fix error condition check

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425740
Christian Brauner [Wed, 6 Dec 2017 20:39:45 +0000 (21:39 +0100)]
coverity: #1425740

free allocated memory

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425739
Christian Brauner [Wed, 6 Dec 2017 20:38:14 +0000 (21:38 +0100)]
coverity: #1425739

check snprintf() return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425737
Christian Brauner [Wed, 6 Dec 2017 20:30:42 +0000 (21:30 +0100)]
coverity: #1425737

free allocated memory

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425735
Christian Brauner [Wed, 6 Dec 2017 20:22:03 +0000 (21:22 +0100)]
coverity: #1425735

use correct inequality comparison

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425734
Christian Brauner [Wed, 6 Dec 2017 20:16:38 +0000 (21:16 +0100)]
coverity: #1425734

free memory on error

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #1994 from brauner/2017-12-04/bugfixes
Stéphane Graber [Wed, 6 Dec 2017 07:02:59 +0000 (23:02 -0800)]
Merge pull request #1994 from brauner/2017-12-04/bugfixes

attach: do not fail on non-existing namespaces

6 years agoMerge pull request #1996 from brauner/2017-12-04/reenable_coverity_scan
Stéphane Graber [Wed, 6 Dec 2017 07:01:11 +0000 (23:01 -0800)]
Merge pull request #1996 from brauner/2017-12-04/reenable_coverity_scan

test: Coverity scan integration

6 years agoMerge pull request #2004 from brauner/2017-12-06/fix_log_env_variable
Stéphane Graber [Wed, 6 Dec 2017 06:59:38 +0000 (22:59 -0800)]
Merge pull request #2004 from brauner/2017-12-06/fix_log_env_variable

start: set loglevel correctly

6 years agostart: set loglevel correctly
Christian Brauner [Tue, 5 Dec 2017 23:16:38 +0000 (00:16 +0100)]
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>
6 years agoarguments: move to tools/ subdirectory
RicardoSanchezA [Tue, 5 Dec 2017 04:03:52 +0000 (22:03 -0600)]
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>
6 years agoMerge pull request #2002 from tenforward/japanese
Christian Brauner [Tue, 5 Dec 2017 10:55:58 +0000 (11:55 +0100)]
Merge pull request #2002 from tenforward/japanese

Add lxc.console.*, lxc.namespace.*, and lxc.init.cwd to Japanese lxc.container.conf(5)

6 years agodoc: Add lxc.init.cwd to Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 5 Dec 2017 08:23:29 +0000 (17:23 +0900)]
doc: Add lxc.init.cwd to Japanese lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
6 years agodoc: Add lxc.namespace.[namespace identifier] to Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 5 Dec 2017 08:08:52 +0000 (17:08 +0900)]
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>
6 years agodoc: Add lxc.console.buffer.* and lxc.console.rotate to Japanese lxc.container.conf(5)
KATOH Yasufumi [Tue, 5 Dec 2017 07:22:37 +0000 (16:22 +0900)]
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>
6 years agoMerge pull request #1992 from lifeng68/add_init_cwd
Christian Brauner [Tue, 5 Dec 2017 04:53:23 +0000 (05:53 +0100)]
Merge pull request #1992 from lifeng68/add_init_cwd

confile:add lxc.init.cwd

6 years agoconfile:add lxc.init.cwd
LiFeng [Mon, 4 Dec 2017 17:12:40 +0000 (12:12 -0500)]
confile:add lxc.init.cwd

Signed-off-by: LiFeng <lifeng68@huawei.com>
6 years agoMerge pull request #2000 from hallyn/2017-12-04/execargs
Christian Brauner [Tue, 5 Dec 2017 04:50:47 +0000 (05:50 +0100)]
Merge pull request #2000 from hallyn/2017-12-04/execargs

lxc_execute: properly figure out number of needed arguments

6 years agolxc_execute: properly figure out number of needed arguments
Serge Hallyn [Tue, 5 Dec 2017 04:30:26 +0000 (22:30 -0600)]
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>
6 years agotest: reenable Coverity integration
Christian Brauner [Mon, 4 Dec 2017 22:41:45 +0000 (23:41 +0100)]
test: reenable Coverity integration

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoattach: do not fail on non-existing namespaces
Christian Brauner [Mon, 4 Dec 2017 11:26:55 +0000 (12:26 +0100)]
attach: do not fail on non-existing namespaces

Closes #1993.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #1979 from marcosps/issue_494
Christian Brauner [Mon, 4 Dec 2017 11:10:22 +0000 (12:10 +0100)]
Merge pull request #1979 from marcosps/issue_494

lxc_unshare: Add uid_mapping when creating userns

6 years agoMerge pull request #1988 from abbasally5/feature-improve-bash-completion-1236
Stéphane Graber [Mon, 4 Dec 2017 07:57:43 +0000 (23:57 -0800)]
Merge pull request #1988 from abbasally5/feature-improve-bash-completion-1236

Add bash completion to list backing store types for lxc-create -B

6 years agoMerge pull request #1989 from p-l-/fix-lxc-checkconfig
Stéphane Graber [Mon, 4 Dec 2017 07:57:19 +0000 (23:57 -0800)]
Merge pull request #1989 from p-l-/fix-lxc-checkconfig

Fix lxc-checkconfig output

6 years agoMerge pull request #1981 from brauner/2017-12-01/fix_android_sethostname
Stéphane Graber [Mon, 4 Dec 2017 07:56:07 +0000 (23:56 -0800)]
Merge pull request #1981 from brauner/2017-12-01/fix_android_sethostname

utils: declare sethostname() static inline

6 years agocriu: silence static analysis
Christian Brauner [Mon, 4 Dec 2017 00:48:46 +0000 (01:48 +0100)]
criu: silence static analysis

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconfile: remove dead assignment
Christian Brauner [Mon, 4 Dec 2017 00:44:45 +0000 (01:44 +0100)]
confile: remove dead assignment

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocriu: initialize status
Christian Brauner [Mon, 4 Dec 2017 00:41:49 +0000 (01:41 +0100)]
criu: initialize status

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconfile_legacy: prevent null pointer deref
Christian Brauner [Mon, 4 Dec 2017 00:38:01 +0000 (01:38 +0100)]
confile_legacy: prevent null pointer deref

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: prevent null pointer dereference
Christian Brauner [Mon, 4 Dec 2017 00:34:50 +0000 (01:34 +0100)]
conf: prevent null pointer dereference

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoInsert missing "echo" after "is_enabled"
Pierre LALET [Sun, 3 Dec 2017 11:32:39 +0000 (12:32 +0100)]
Insert missing "echo" after "is_enabled"

Signed-off-by: Pierre LALET <pierre.lalet@cea.fr>
6 years agoFix SETCOLOR_FAILURE evaluation
Pierre LALET [Sun, 3 Dec 2017 10:28:07 +0000 (11:28 +0100)]
Fix SETCOLOR_FAILURE evaluation

Signed-off-by: Pierre LALET <pierre.lalet@cea.fr>
6 years agoAdd bash completion to list backing store types for lxc-create -B
Abbas Ally [Sun, 3 Dec 2017 05:51:44 +0000 (05:51 +0000)]
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>
6 years agoMerge pull request #1984 from CC-Hsu/patch-1
Christian Brauner [Sat, 2 Dec 2017 12:00:36 +0000 (13:00 +0100)]
Merge pull request #1984 from CC-Hsu/patch-1

Add new dependency to Slackware template

6 years agoAdd new dependency to Slackware template
CC-Hsu [Sat, 2 Dec 2017 11:27:34 +0000 (19:27 +0800)]
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>
6 years agoMerge pull request #1983 from iDarkTemplar/update_template
Christian Brauner [Sat, 2 Dec 2017 08:10:56 +0000 (09:10 +0100)]
Merge pull request #1983 from iDarkTemplar/update_template

Update gentoo.moresecure.conf.

6 years agoUpdate gentoo.moresecure.conf.
i.Dark_Templar [Sat, 2 Dec 2017 07:33:51 +0000 (10:33 +0300)]
Update gentoo.moresecure.conf.

Closes https://github.com/lxc/lxc/issues/1928

Signed-off-by: i.Dark_Templar <darktemplar@dark-templar-archives.net>
6 years agolxc_unshare: Add uid_mapping when creating userns
Marcos Paulo de Souza [Wed, 29 Nov 2017 01:49:28 +0000 (23:49 -0200)]
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>
6 years agoutils: declare sethostname() static inline
Christian Brauner [Fri, 1 Dec 2017 22:18:09 +0000 (23:18 +0100)]
utils: declare sethostname() static inline

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #1980 from flx42/lxc-oci-layer-caching
Serge Hallyn [Fri, 1 Dec 2017 19:50:11 +0000 (13:50 -0600)]
Merge pull request #1980 from flx42/lxc-oci-layer-caching

OCI layer caching + misc fixes

6 years agolxc-oci: support skopeo layer caching
Felix Abecassis [Fri, 1 Dec 2017 19:04:34 +0000 (11:04 -0800)]
lxc-oci: support skopeo layer caching

This requires skopeo version 0.1.25

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agolxc-oci: support index files with multiple manifests
Felix Abecassis [Fri, 1 Dec 2017 06:51:57 +0000 (22:51 -0800)]
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>
6 years agolxc-oci: rely on jq instead of sed to transform values
Felix Abecassis [Fri, 1 Dec 2017 06:51:53 +0000 (22:51 -0800)]
lxc-oci: rely on jq instead of sed to transform values

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agolxc-oci: remove unhelpful comment
Felix Abecassis [Fri, 1 Dec 2017 06:51:47 +0000 (22:51 -0800)]
lxc-oci: remove unhelpful comment

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agolxc-oci: cleanup temporary download directory if umoci is interrupted
Felix Abecassis [Fri, 1 Dec 2017 06:51:38 +0000 (22:51 -0800)]
lxc-oci: cleanup temporary download directory if umoci is interrupted

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #1955 from flx42/confile-fix-misc-issues
Christian Brauner [Wed, 29 Nov 2017 11:41:39 +0000 (12:41 +0100)]
Merge pull request #1955 from flx42/confile-fix-misc-issues

Fix errors in configuration file parsing

6 years agoconfile_utils: simplify lxc_config_net_hwaddr
Felix Abecassis [Wed, 29 Nov 2017 04:27:53 +0000 (20:27 -0800)]
confile_utils: simplify lxc_config_net_hwaddr

In addition to the memory corruption fixed in ee3e84df78424d26fc6c90862fbe0fa92a686b0d,
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>
6 years agoconfile: error out if a network configuration key has no subkey
Felix Abecassis [Wed, 29 Nov 2017 04:27:44 +0000 (20:27 -0800)]
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>
6 years agolog: fix infinite loop with multiple lxc.log.syslog keys
Felix Abecassis [Wed, 29 Nov 2017 04:27:39 +0000 (20:27 -0800)]
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>
6 years agotests: add a function for negative netdev tests
Felix Abecassis [Wed, 29 Nov 2017 04:27:34 +0000 (20:27 -0800)]
tests: add a function for negative netdev tests

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoconfile: fix memory leak
Felix Abecassis [Wed, 29 Nov 2017 04:27:28 +0000 (20:27 -0800)]
confile: fix memory leak

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoMerge pull request #1932 from 3XX0/dhclient-hook
Serge Hallyn [Wed, 29 Nov 2017 02:16:50 +0000 (20:16 -0600)]
Merge pull request #1932 from 3XX0/dhclient-hook

hooks: add dhclient hooks

6 years agoMerge pull request #1958 from AustinReichert/tools-refactor-lxc-wait
Christian Brauner [Wed, 29 Nov 2017 01:32:35 +0000 (02:32 +0100)]
Merge pull request #1958 from AustinReichert/tools-refactor-lxc-wait

tools/lxc_wait: removed internal logging

6 years agoMerge pull request #1959 from AustinReichert/tools-refactor-lxc-usernsexec
Christian Brauner [Wed, 29 Nov 2017 01:15:04 +0000 (02:15 +0100)]
Merge pull request #1959 from AustinReichert/tools-refactor-lxc-usernsexec

tools/lxc_usernsexec: removed internal logging

6 years agoMerge pull request #1960 from AustinReichert/tools-refactor-lxc-unfreeze
Christian Brauner [Wed, 29 Nov 2017 01:03:01 +0000 (02:03 +0100)]
Merge pull request #1960 from AustinReichert/tools-refactor-lxc-unfreeze

tools/lxc_unfreeze: removed internal logging

6 years agoMerge pull request #1961 from AustinReichert/tools-refactor-lxc-top
Christian Brauner [Wed, 29 Nov 2017 01:01:30 +0000 (02:01 +0100)]
Merge pull request #1961 from AustinReichert/tools-refactor-lxc-top

tools/lxc_top: removed internal logging

6 years agoMerge pull request #1962 from AustinReichert/tools-refactor-lxc-stop
Christian Brauner [Wed, 29 Nov 2017 00:56:36 +0000 (01:56 +0100)]
Merge pull request #1962 from AustinReichert/tools-refactor-lxc-stop

tools/lxc_stop: removed internal logging

6 years agoMerge pull request #1963 from AustinReichert/tools-refactor-lxc-start
Christian Brauner [Wed, 29 Nov 2017 00:55:47 +0000 (01:55 +0100)]
Merge pull request #1963 from AustinReichert/tools-refactor-lxc-start

tools/lxc_start: removed internal logging

6 years agoMerge pull request #1964 from AustinReichert/tools-refactor-lxc-snapshot
Christian Brauner [Wed, 29 Nov 2017 00:54:47 +0000 (01:54 +0100)]
Merge pull request #1964 from AustinReichert/tools-refactor-lxc-snapshot

tools/lxc_snapshot: removed internal logging

6 years agoMerge pull request #1966 from AustinReichert/tools-refactor-lxc-ls
Christian Brauner [Wed, 29 Nov 2017 00:54:16 +0000 (01:54 +0100)]
Merge pull request #1966 from AustinReichert/tools-refactor-lxc-ls

tools/lxc_ls: remove internal logging

6 years agoMerge pull request #1965 from AustinReichert/tools-refactor-lxc-monitor
Christian Brauner [Wed, 29 Nov 2017 00:53:18 +0000 (01:53 +0100)]
Merge pull request #1965 from AustinReichert/tools-refactor-lxc-monitor

tools/lxc_monitor: removed internal logging

6 years agoMerge pull request #1967 from AustinReichert/tools-refactor-lxc-info
Christian Brauner [Wed, 29 Nov 2017 00:52:47 +0000 (01:52 +0100)]
Merge pull request #1967 from AustinReichert/tools-refactor-lxc-info

tools/lxc_info: removed internal logging

6 years agoMerge pull request #1968 from AustinReichert/tools-refactor-lxc-freeze
Christian Brauner [Wed, 29 Nov 2017 00:52:38 +0000 (01:52 +0100)]
Merge pull request #1968 from AustinReichert/tools-refactor-lxc-freeze

tools/lxc_freeze: remove internal logging

6 years agoMerge pull request #1969 from AustinReichert/tools-refactor-lxc-execute
Christian Brauner [Wed, 29 Nov 2017 00:50:39 +0000 (01:50 +0100)]
Merge pull request #1969 from AustinReichert/tools-refactor-lxc-execute

tools/lxc_execute: removed internal logging

6 years agoMerge pull request #1957 from AustinReichert/tools-refactor-lxc-unshare
Christian Brauner [Wed, 29 Nov 2017 00:50:07 +0000 (01:50 +0100)]
Merge pull request #1957 from AustinReichert/tools-refactor-lxc-unshare

tools/lxc_unshare: removed internal logging

6 years agoMerge pull request #1970 from AustinReichert/tools-refactor-lxc-device
Christian Brauner [Wed, 29 Nov 2017 00:42:39 +0000 (01:42 +0100)]
Merge pull request #1970 from AustinReichert/tools-refactor-lxc-device

tools/lxc_device: remove internal logging

6 years agoMerge pull request #1971 from AustinReichert/tools-refactor-lxc-destroy
Christian Brauner [Wed, 29 Nov 2017 00:42:00 +0000 (01:42 +0100)]
Merge pull request #1971 from AustinReichert/tools-refactor-lxc-destroy

tools/lxc_destroy: remove internal logging

6 years agoMerge pull request #1972 from AustinReichert/tools-refactor-lxc-create
Christian Brauner [Wed, 29 Nov 2017 00:41:36 +0000 (01:41 +0100)]
Merge pull request #1972 from AustinReichert/tools-refactor-lxc-create

tools/lxc_create: remove internal logging

6 years agoMerge pull request #1973 from AustinReichert/tools-refactor-lxc-copy
Christian Brauner [Wed, 29 Nov 2017 00:41:10 +0000 (01:41 +0100)]
Merge pull request #1973 from AustinReichert/tools-refactor-lxc-copy

tools/lxc_copy: remove internal logging

6 years agoMerge pull request #1974 from AustinReichert/tools-refactor-lxc-console
Christian Brauner [Wed, 29 Nov 2017 00:40:05 +0000 (01:40 +0100)]
Merge pull request #1974 from AustinReichert/tools-refactor-lxc-console

tools/lxc_console: remove internal logging

6 years agoMerge pull request #1975 from AustinReichert/tools-refactor-lxc-clone
Christian Brauner [Wed, 29 Nov 2017 00:39:42 +0000 (01:39 +0100)]
Merge pull request #1975 from AustinReichert/tools-refactor-lxc-clone

tools/lxc_clone: remove internal logging

6 years agotools/lxc_wait: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:55:53 +0000 (17:55 -0600)]
tools/lxc_wait: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_usernsexec: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:54:11 +0000 (17:54 -0600)]
tools/lxc_usernsexec: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_unshare: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:48:06 +0000 (17:48 -0600)]
tools/lxc_unshare: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_unfreeze: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:38:48 +0000 (17:38 -0600)]
tools/lxc_unfreeze: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_top: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:35:45 +0000 (17:35 -0600)]
tools/lxc_top: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_stop: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:29:25 +0000 (17:29 -0600)]
tools/lxc_stop: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_start: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:16:07 +0000 (17:16 -0600)]
tools/lxc_start: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_snapshot: removed internal logging
AustinReichert [Tue, 28 Nov 2017 23:07:24 +0000 (17:07 -0600)]
tools/lxc_snapshot: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_monitor: removed internal logging
AustinReichert [Tue, 28 Nov 2017 22:59:14 +0000 (16:59 -0600)]
tools/lxc_monitor: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_copy: remove internal logging
AustinReichert [Tue, 28 Nov 2017 22:56:17 +0000 (16:56 -0600)]
tools/lxc_copy: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_ls: remove internal logging
AustinReichert [Tue, 28 Nov 2017 22:50:16 +0000 (16:50 -0600)]
tools/lxc_ls: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_info: removed internal logging
AustinReichert [Tue, 28 Nov 2017 09:34:42 +0000 (03:34 -0600)]
tools/lxc_info: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_freeze: remove internal logging
AustinReichert [Tue, 28 Nov 2017 09:32:50 +0000 (03:32 -0600)]
tools/lxc_freeze: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_execute: removed internal logging
AustinReichert [Tue, 28 Nov 2017 09:30:24 +0000 (03:30 -0600)]
tools/lxc_execute: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_device: remove internal logging
AustinReichert [Tue, 28 Nov 2017 09:26:25 +0000 (03:26 -0600)]
tools/lxc_device: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_destroy: remove internal logging
AustinReichert [Tue, 28 Nov 2017 09:19:29 +0000 (03:19 -0600)]
tools/lxc_destroy: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_create: remove internal logging
AustinReichert [Tue, 28 Nov 2017 09:14:54 +0000 (03:14 -0600)]
tools/lxc_create: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_console: remove internal logging
AustinReichert [Tue, 28 Nov 2017 08:52:16 +0000 (02:52 -0600)]
tools/lxc_console: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_clone: remove internal logging
AustinReichert [Tue, 28 Nov 2017 08:41:23 +0000 (02:41 -0600)]
tools/lxc_clone: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agoMerge pull request #1952 from marcosps/duplicated_sethostname
Christian Brauner [Tue, 28 Nov 2017 08:09:04 +0000 (09:09 +0100)]
Merge pull request #1952 from marcosps/duplicated_sethostname

utils.h: Avoid duplicated sethostname implementation

6 years agoMerge pull request #1954 from AustinReichert/tools-refactor-lxc-autostart
Christian Brauner [Tue, 28 Nov 2017 08:07:35 +0000 (09:07 +0100)]
Merge pull request #1954 from AustinReichert/tools-refactor-lxc-autostart

tools/lxc_autostart: remove internal logging

6 years agoMerge pull request #1953 from AustinReichert/tools-refactor-lxc-cgroup
Christian Brauner [Tue, 28 Nov 2017 08:07:03 +0000 (09:07 +0100)]
Merge pull request #1953 from AustinReichert/tools-refactor-lxc-cgroup

tools/lxc_cgroup: remove internal logging

6 years agotools/lxc_autostart: remove internal logging
AustinReichert [Tue, 28 Nov 2017 07:12:18 +0000 (01:12 -0600)]
tools/lxc_autostart: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agotools/lxc_cgroup: remove internal logging
AustinReichert [Tue, 28 Nov 2017 06:43:46 +0000 (00:43 -0600)]
tools/lxc_cgroup: remove internal logging

Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
6 years agoutils.h: Avoid duplicated sethostname implementation
Marcos Paulo de Souza [Tue, 28 Nov 2017 01:48:57 +0000 (23:48 -0200)]
utils.h: Avoid duplicated sethostname implementation

Move duplicated implementatin of sethostname from conf.c and
lxc_unshare.c to utils.h

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoMerge pull request #1949 from marcosps/issue_84
Serge Hallyn [Mon, 27 Nov 2017 23:58:35 +0000 (17:58 -0600)]
Merge pull request #1949 from marcosps/issue_84

Use AX_PTHREAD config script to detect pthread api

6 years agoseccomp: filter syscalls based on arguments
LiFeng [Thu, 23 Nov 2017 19:15:23 +0000 (14:15 -0500)]
seccomp: filter syscalls based on arguments

In order to support filtering syscalls based on arguments the seccomp version 2
specification is extended to the following form:

syscall_name action [index,value,op,valueTwo] [index,value,op]...

where the arguments of the tuple [index,value,valueTwo,op] have the following
meaning:
1. index (uint32_t):
   The index of the syscall argument.
2. value (uint64_t):
   The value for the syscall argument specified by "index".
3. valueTwo (uint64_t, optional):
   The value for the syscall argument specified by "index". This optional value
   is only valid in conjunction with SCMP_CMP_MASKED_EQ.
4. op (string):
   The operator for the syscall argument. Valid operators are the constants
   - SCMP_CMP_NE        (!=)
   - SCMP_CMP_LE        (<=)
   - SCMP_CMP_EQ        (==)
   - SCMP_CMP_GE        (>=)
   - SCMP_CMP_GT        (>)
   - SCMP_CMP_MASKED_EQ (&=)
   as defined by libseccomp >= v2.3.2.
   For convenience liblxc also understands the standard operator notation
   indicated in brackets after the libseccomp constants above as an equivalent
   notation.
Note that it is legal to specify multiple entries for the same syscall.

An example for an extended seccomp version 2 profile is:

2
blacklist allow
reject_force_umount  # comment this to allow umount -f;  not recommended
[all]
kexec_load errno 1 [0,1,SCMP_CMP_LE][3,1,==][5,1,SCMP_CMP_MASKED_EQ,1]
open_by_handle_at errno 1
init_module errno 1
finit_module errno 1
delete_module errno 1
unshare errno 9 [0,0x10000000,SCMP_CMP_EQ]
unshare errno 2 [0,0x20000000,SCMP_CMP_EQ]

Closes #1564.

Signed-off-by: LiFeng <lifeng68@huawei.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoUse AX_PTHREAD config script to detect pthread api
Marcos Paulo de Souza [Sun, 26 Nov 2017 18:45:22 +0000 (16:45 -0200)]
Use AX_PTHREAD config script to detect pthread api

Closes: #84
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agostart.c: always switch uid and gid
Yifeng Tan [Fri, 24 Nov 2017 12:03:47 +0000 (20:03 +0800)]
start.c: always switch uid and gid

Signed-off-by: Yifeng Tan <tanyifeng1@huawei.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>