Commit Graph

6355 Commits

Author SHA1 Message Date
Christian Brauner
3d4605a45b
Merge pull request #1973 from AustinReichert/tools-refactor-lxc-copy
tools/lxc_copy: remove internal logging
2017-11-29 01:41:10 +01:00
Christian Brauner
5c70fa4bca
Merge pull request #1974 from AustinReichert/tools-refactor-lxc-console
tools/lxc_console: remove internal logging
2017-11-29 01:40:05 +01:00
Christian Brauner
76c0e5f8f2
Merge pull request #1975 from AustinReichert/tools-refactor-lxc-clone
tools/lxc_clone: remove internal logging
2017-11-29 01:39:42 +01:00
AustinReichert
bc1fc88d00 tools/lxc_wait: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:55:53 -06:00
AustinReichert
3eaff0ba58 tools/lxc_usernsexec: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:54:11 -06:00
AustinReichert
076d1ba7fb tools/lxc_unshare: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:48:06 -06:00
AustinReichert
feb3402023 tools/lxc_unfreeze: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:38:48 -06:00
AustinReichert
8052112c23 tools/lxc_top: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:35:45 -06:00
AustinReichert
38d28c16d2 tools/lxc_stop: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:29:25 -06:00
AustinReichert
e54ecee403 tools/lxc_start: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:17:04 -06:00
AustinReichert
8457116379 tools/lxc_snapshot: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 17:07:24 -06:00
AustinReichert
b4b4ff0b23 tools/lxc_monitor: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 16:59:14 -06:00
AustinReichert
4a296c6378 tools/lxc_copy: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 16:56:17 -06:00
AustinReichert
d36ae708d3 tools/lxc_ls: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 16:50:16 -06:00
Christian Brauner
1c7222c084
btrfs: fix btrfs_snapshot()
Closes #1956.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 22:44:40 +01:00
Christian Brauner
41dc71558e
storage: constify where possible
This was made necessary by changes to the overlay driver.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:47 +01:00
Christian Brauner
ec5d663c3e
storage: remove unused declaration
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:45 +01:00
Christian Brauner
06d0056c0a
storage: make storage_copy() cleaner
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:43 +01:00
Christian Brauner
e9e29a33cf
lxccontainer: various container creation fixes
This is beneficial for LXD as well.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:37 +01:00
Christian Brauner
8a388ed4fc
storage: make storage_init() smart and simplify
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:35 +01:00
Christian Brauner
068aa488b6
storage: make storage_dir() smart
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:27 +01:00
Christian Brauner
70d6bd97e6
loop: adapt to new config rootfs parser
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:25 +01:00
Christian Brauner
09f6f8c4d4
overlay: adapt to new config rootfs parser
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:23 +01:00
Christian Brauner
63c9ffa070
storage: pass down storage type
The configuration file parser now already detects the storage type so spare the
work and pass it down to the storage drivers.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:21 +01:00
Christian Brauner
693dbdb975
confile: parse storage type
Split lxc.rootfs.path = <storage type>:<container path> into <storage-type> and
<container path> to set the storage type and rootfs path value correctly.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:19 +01:00
Christian Brauner
ea7f6b29bc
criu: detect veth name
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2017-11-28 13:52:15 +01:00
AustinReichert
4fd8586c37 tools/lxc_info: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:34:42 -06:00
AustinReichert
517c768159 tools/lxc_freeze: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:32:50 -06:00
AustinReichert
9357140cab tools/lxc_execute: removed internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:30:24 -06:00
AustinReichert
f132fdbdc6 tools/lxc_device: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:26:25 -06:00
AustinReichert
525dcf890b tools/lxc_destroy: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:19:29 -06:00
AustinReichert
72e2c30726 tools/lxc_create: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 03:14:54 -06:00
AustinReichert
84cb7e2b6c tools/lxc_console: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 02:52:16 -06:00
AustinReichert
fdb9aa94df tools/lxc_clone: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 02:41:23 -06:00
Christian Brauner
8a0a156e7a
Merge pull request #1952 from marcosps/duplicated_sethostname
utils.h: Avoid duplicated sethostname implementation
2017-11-28 09:09:04 +01:00
Christian Brauner
7baea1c1a3
Merge pull request #1954 from AustinReichert/tools-refactor-lxc-autostart
tools/lxc_autostart: remove internal logging
2017-11-28 09:07:35 +01:00
Christian Brauner
12df65ded7
Merge pull request #1953 from AustinReichert/tools-refactor-lxc-cgroup
tools/lxc_cgroup: remove internal logging
2017-11-28 09:07:03 +01:00
AustinReichert
5f514ceea6 tools/lxc_autostart: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 01:12:18 -06:00
AustinReichert
614db2e111 tools/lxc_cgroup: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert@utexas.edu>
2017-11-28 00:43:46 -06:00
Marcos Paulo de Souza
ac181b5c3c 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>
2017-11-28 00:13:49 -02:00
Serge Hallyn
fd3c548d61
Merge pull request #1949 from marcosps/issue_84
Use AX_PTHREAD config script to detect pthread api
2017-11-27 17:58:35 -06:00
LiFeng
3ee26d1983
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>
2017-11-27 22:07:24 +01: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
Yifeng Tan
928b1f04fc
start.c: always switch uid and gid
Signed-off-by: Yifeng Tan <tanyifeng1@huawei.com>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-11-25 02:03:59 +01:00
Stéphane Graber
f55cf89e9d
Merge pull request #1947 from brauner/2017-11-24/fix_cap_sys_admin_declaration
conf: move CAP_SYS_* definitions to utils.h
2017-11-24 11:00:06 -05:00
Christian Brauner
478fb51d4e
conf: move CAP_SYS_* definitions to utils.h
Closes #1946.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-11-24 13:25:51 +01:00
Christian Brauner
dc3de87251
Merge pull request #1944 from dnegreira/lxc_spec_in_typo_fix
Fixed typo on lxc.spec.in
2017-11-23 21:34:51 +01:00
David Negreira
e82021215f Fixed typo on lxc.spec.in
Signed-off-by: David Negreira David@otherreality.net
2017-11-23 21:23:14 +01:00
Stéphane Graber
a122de392b
Merge pull request #1939 from brauner/2017-11-22/more_elaborate_config_update_message
doc: documents lxc.namespace.[namespace identifier] + confile: improve legacy update message
2017-11-23 12:28:08 -05:00
Christian Brauner
b151c7e532
Merge pull request #1941 from flx42/lxc-oci-improve-import
Improve lxc-oci.in
2017-11-23 13:20:33 +01:00