Commit Graph

7 Commits

Author SHA1 Message Date
Maksym Pavlenko
1ade777c24 Add basic spec and mounts for Darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-12 17:00:40 -08:00
Andrew G. Morgan
6906b57c72
Fix the Inheritable capability defaults.
The Linux kernel never sets the Inheritable capability flag to
anything other than empty. Non-empty values are always exclusively
set by userspace code.

[The kernel stopped defaulting this set of capability values to the
 full set in 2000 after a privilege escalation with Capabilities
 affecting Sendmail and others.]

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
2022-02-01 13:55:46 -08:00
Akihiro Suda
a2d1a8a865
oci.WithPrivileged: set the current caps, not the known caps
This change is needed for running the latest containerd inside Docker
that is not aware of the recently added caps (BPF, PERFMON, CHECKPOINT_RESTORE).

Without this change, containerd inside Docker fails to run containers with
"apply caps: operation not permitted" error.

See kubernetes-sigs/kind 2058

NOTE: The caller process of this function is now assumed to be as
privileged as possible.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-10 17:14:17 +09:00
fahedouch
afd33bce81 test add tests to spec_opts
Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

test func WithDefaultPathEnv & WithDefaultSpecForPlatform

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

fix nil context

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

[test] TTY information && ProcessCwd

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

fix TestWithTTYSize value

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

test WithUserNamespace sets the uid and gid mappings for the task

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

format test file

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

update TestWithUserNamespace check condition

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

relaunch ci

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

improve spec_opts_test test coverage

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>
2019-11-22 18:16:36 +01:00
chentanjun
8788af7f8d modify-document-duplicate-word
Signed-off-by: chentanjun <2799194073@qq.com>
2019-09-05 09:10:19 +08:00
Justin Terry (VM)
ef910311e8 Add a Windows section for Linux oci on LCOW
When creating a default OCI spec on Windows that is targeting the LCOW
platform it needs to contain a Windows section as well. This adds the
Windows section by default. It also protects against this case for all
OCI creation that doesnt use the OCI package in the runhcs-shim.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-09-06 11:05:45 -07:00
Justin Terry (VM)
c818a6b13d Merges the oci package for Linux and Windows
On Windows we need to be able to create both Linux and Windows OCI spec
files by default to support WCOW and LCOW scenarios. This merges the
compile time differences into runtime differences between the two based
on the spec and platform the user sets.

It maintains the old behavior with Default specs resulting in the
platform default the binary is compiled for.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2018-08-30 09:46:04 -07:00