Commit Graph

3574 Commits

Author SHA1 Message Date
Michael Adam
2ae8252a4f lxc-centos: fix tab/space mixup in help text.
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
6976826fed lxc-centos: fix parsing of option "--clean": it takes no argument
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
c4834f3c12 lxc-openmandriva: protect possibly unset variable with quotes in -z check
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
fe9d4df40a lxc-openmandriva: fix parsing of option "--clean": it takes no argument
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
4986f1c435 lxc-altlinux: protect possibly unset variable with quotes for -z check
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
217535de29 lxc-altlinux: fix parsing of option "--clean": it takes no argument
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
b5a285ea8f lxc-opensuse: protect possibly unset variable with quotes in -z check
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
eb4cd29636 lxc-opensuse: fix parsing of option "--clean": it takes no argument
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
1111674232 lxc-opensuse: fix tab/whitespace mixup in usage text.
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
227c560065 lxc-debian: protect possibly unset variable with quotes for -z check
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
a64da4c358 lxc-debian: document "--clean" in the usage.
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
Michael Adam
e4d4da6211 lxc-debian: fix parsing of option "--clean": it takes no argument.
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-01-10 10:07:41 -06:00
hallyn
bb2afd6038 Merge pull request #393 from martinpitt/master
apparmor: Fix slave bind mounts
2015-01-08 10:57:57 -06:00
Martin Pitt
64b4c7a34b apparmor: Fix slave bind mounts
The permission to make a mount "slave" is spelt "make-slave", not "slave", see
https://launchpad.net/bugs/1401619. Also, we need to make all mounts slave, not
just the root dir.

https://launchpad.net/bugs/1350947
2015-01-08 13:09:37 +01:00
Stéphane Graber
97a8f74f0c Also drop caps in unpriv containers
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-05 16:28:36 -05:00
Stéphane Graber
98b745498b apparmor: Block access to /proc/kcore
Just like we block access to mem and kmem, there's no good reason for
the container to have access to kcore.

Reported-by: Marc Schaefer
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-05 16:28:33 -05:00
Natanael Copa
abf117c398 lxc-alpine: use yaml for detection of latest release
Alpine Linux provides yaml files with latest release instead of the old
approach with .latest.txt.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-01-05 16:27:39 -05:00
Michael Adam
afc55ed279 lxc-fedora: In fedora21, the fedora-repos package is needed.
fedora-release has been split into fedora-release and fedora-repos.

Signed-off-by: Michael Adam <obnox@samba.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-05 16:25:42 -05:00
Michael Adam
5b75ee4747 lxc-fedora: when using systemd, set lxc.kmsg = 0 in the config
This is to prevent systemd-journald to enter a 100% cpu loop.

Signed-off-by: Michael Adam <obnox@samba.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-05 16:25:37 -05:00
Johannes Kastl
d3eccbbf80 lxc-opensuse: Disable building openSUSE containers on 13.2/Tumbleweed only if wrong version of build package is installed
Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-19 13:45:07 -05:00
Johannes Kastl
8f3a3cd805 lxc-opensuse: default release changed to 13.1, as 12.3 reaches end-of-life soon
Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-19 13:43:21 -05:00
Serge Hallyn
218f99322c Enable seccomp by default for unprivileged users.
In contrast to what the comment above the line disabling it said,
it seems to work just fine.  It also is needed on current kernels
(until Eric's patch hits upstream) to prevent unprivileged containers
from hosing fuse filesystems they inherit.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-19 13:42:54 -05:00
Serge Hallyn
6166fa6d83 seccomp: add rule to reject umount -f
If a container has a bind mount from a host nfs or fuse
filesystem, and does 'umount -f', it will disconnect the
host's filesystem.  This patch adds a seccomp rule to
block umount -f from a container.  It also adds that rule
to the default seccomp profile.

Thanks stgraber for the idea :)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-19 13:42:47 -05:00
Veres Lajos
ec64264d78 typofixes - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-04 18:40:26 -05:00
S.Çağlar Onur
8479c13635 rmdir and lxc_unpriv returns non-negative error codes
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-04 14:14:03 -05:00
Shuai Zhang
06f976cad7 audit: added capacity and reserve() to nlmsg
There are now two (permitted) ways to add data to netlink message:

 1. put_xxx()
 2. call nlmsg_reserve() to get a pointer to newly reserved room within the
    original netlink message, then write or memcpy data to that area.

Both of them guarantee adding requested length data do not overflow the
pre-allocated message buffer by checking against its cap field first.

And there may be no need to access nlmsg_len outside nl module, because both
put_xxx() and nlmsg_reserve() have alread did that for us.

Signed-off-by: Shuai Zhang <zs.broccoli@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-04 11:49:57 -05:00
Arjun Sreedharan
21e624d9cf tests: try again when waitpid() sets errno as EINTR
when waitpid() is interrupted, errno is not set to the negative
value -EINTR. It is set to EINTR. check against EINTR.

Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-04 11:48:00 -05:00
Stéphane Graber
d2928eafbb
change version to 1.1.0.alpha3 in configure.ac
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-03 14:59:15 -05:00
Shuai Zhang
c8a600ea29 fixed typo in comment
Signed-off-by: Shuai Zhang <zs.broccoli@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-03 11:04:19 -05:00
Stéphane Graber
2e2d6a7be9
Improve veth error cases logging
The previous error message made it look like the host interface name was
the concatenation of both the host and guest interface names.

Closes #374

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-03 11:01:45 -05:00
Cameron Norman
4de03d375b lxc-debian: mask both Wheezy and Jessie udev services
Signed-off-by: Cameron Norman <camerontnorman@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:59:21 -05:00
Cameron Norman
2b75b644f8 lxc-debian: adjust init system configurations
Do as much as possible to allow containers switching from non-systemd to
systemd to work as intended (but nothing that will cause side effects).
Use update-rc.d disable instead of remove so the init scripts are not
re-enabled when the package is updated

Signed-off-by: Cameron Norman <camerontnorman@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:59:16 -05:00
KATOH Yasufumi
be54cb1c55 doc: Always include the Japanese lxc-top manpage
Update for commit e71549f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:56:03 -05:00
KATOH Yasufumi
c881c406ac Add the Japanese translation for the lxc.init_cmd config option
Update for commit 67c660d

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:55:56 -05:00
Stéphane Graber
a4318300b4 Revert "audit: added capacity and reserve() to nlmsg"
This reverts commit 55ae7edb18.

This change caused hangs in the testsuite, specifically with lxc-user-nic.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 15:37:42 -05:00
Casey Marshall
26f1b3902c Allow lxc_clear_config_item to clear idmaps.
Ran into this when trying to automate stgraber's "GUI in containers"
post.

Signed-off-by: Casey Marshall <casey.marshall@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 15:15:32 -05:00
overlay fs
40d811614c Issue #278: lxc-start-ephemeral: add --cdir option for cow-mounts
This is a copy of patch version 3 for issue #278 on the issue-tracker:

 - Allow multiple bind-mounts (--bdir) and multiple cow-mounts (--cdir).

 - Further fixes to permissions throughout lxc-start-ephemeral (annotated
   in the code).

Signed-off by: Oleg Freedholm <overlayfs@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 14:01:56 -05:00
Johannes Kastl
de548c6055 lxc-opensuse: Disabling builds on openSUSE Tumbleweed, detection improved.
Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:47:10 -05:00
Stéphane Graber
e71549fc7e doc: Always include the lxc-top manpage
Since it's no longer written in lua.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:46:37 -05:00
Stéphane Graber
67c660d0aa Define a new lxc.init_cmd config option
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
2014-12-01 13:46:11 -05:00
Stéphane Graber
c464fd7e01 tabs/spaces consistency
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:44:11 -05:00
Stéphane Graber
358f18beab Add missing files to ignore list
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
2014-12-01 13:43:25 -05:00
Shuai Zhang
55ae7edb18 audit: added capacity and reserve() to nlmsg
There are now two (permitted) ways to add data to netlink message:

1. put_xxx()
2. call nlmsg_reserve() to get a pointer to newly reserved room within the
   original netlink message, then write or memcpy data to that area.

Both of them guarantee adding requested length data do not overflow the
pre-allocated message buffer by checking against its cap field first.

And there may be no need to access nlmsg_len outside nl module, because both
put_xxx() and nlmsg_reserve() have alread did that for us.

Signed-off-by: Shuai Zhang <zs.broccoli@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:42:41 -05:00
Johannes Kastl
f38788b405 lxc-opensuse: Disable on 13.2
Disabled building openSUSE containers on openSUSE 13.2 and  openSUSE
Tumbleweed due to faulty behaviour with newer versions of
init_buildsystem.

Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-27 17:52:22 -05:00
Natanael Copa
646b1ef753 lxc-alpine: create a default tty for console
Create a tty so we get login prompt on console by default

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-27 17:50:31 -05:00
Natanael Copa
b55a662242 lxc-alpine: make sure /dev/shm is world writeable
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-27 17:50:28 -05:00
Shuai Zhang
b588716468 fix wrong nlmsg_len
nlmsg_len is the length of message including header.

Signed-off-by: Shuai Zhang <zs.broccoli@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-27 17:48:25 -05:00
Stéphane Graber
a6ee12772a
Fix nbd partition id test
Reported-by: David Binderman
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-26 16:40:04 -05:00
Abin Shahab
7c5b6e7c35 Remounts bind mounts if read-only flag is provided
Bind mounts do not honor filesystem mount options. This change will
remount filesystems that are bind mounted if there are changes to
filesystem mount options, specifically if the mount is readonly.

Signed-off-by: Abin Shahab <ashahab@altiscale.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-11-26 10:33:54 -05:00
KATOH Yasufumi
fb26e957f1 doc: change "-t" option of lxc-create(1) to being required
* fix "reg" to "req" in English (fix for commit b8683fe)
* change "opt" to "req" in Japanese

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-11-26 10:33:25 -05:00