9 Commits

Author SHA1 Message Date
4e5e9dbec2 mount: add new options nocopyup|copyup for tmpfs
add a way to disable tmpcopyup for tmpfs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-07 18:24:02 +01:00
96812dc490 Fix addition of mount options when using RO tmpfs
For read-only containers set to create tmpfs filesystems over
/run and other common destinations, we were incorrectly setting
mount options, resulting in duplicate mount options.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
820e242e82 Allow :z and :Z with ProcessOptions
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
5bdd97f77f Set base mount options for bind mounts from base system
If I mount, say, /usr/bin into my container - I expect to be able
to run the executables in that mount. Unconditionally applying
noexec would be a bad idea.

Before my patches to change mount options and allow exec/dev/suid
being set explicitly, we inferred the mount options from where on
the base system the mount originated, and the options it had
there. Implement the same functionality for the new option
handling.

There's a lot of performance left on the table here, but I don't
know that this is ever going to take enough time to make it worth
optimizing.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
02264d597f Add support for 'exec', 'suid', 'dev' mount flags
Previously, we explicitly set noexec/nosuid/nodev on every mount,
with no ability to disable them. The 'mount' command on Linux
will accept their inverses without complaint, though - 'noexec'
is counteracted by 'exec', 'nosuid' by 'suid', etc. Add support
for passing these options at the command line to disable our
explicit forcing of security options.

This also cleans up mount option handling significantly. We are
still parsing options in more than one place, which isn't good,
but option parsing for bind and tmpfs mounts has been unified.

Fixes: #3819
Fixes: #3803

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-08-28 14:28:18 -04:00
2eda50cb31 Remove --tmpfs size default
Docker has unlimited tmpfs size where Podman had it set to 64mb. Should be standard between the two.
Remove noexec default

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
2019-08-14 09:42:33 -04:00
8e5b294ac3 Allow (but ignore) Cached and Delegated volume options
These are only used on OS X Docker, and ignored elsewhere - but
since they are ignored, they're guaranteed to be safe everywhere,
and people are using them.

Fixes: #3340

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-18 17:02:20 -04:00
23efe4cb81 storage: support --mount type=bind,bind-nonrecursive
add support for not recursive bind mounts.

Closes: https://github.com/containers/libpod/issues/3314

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-13 15:32:45 +02:00
30257cf073 Ensure that named volumes have their options parsed
This involves moving some code out of pkg/spec/ into util/ so it
can also be used by libpod.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-01 10:19:05 -04:00