Skip to content

Commit

Permalink
mount: Allow relative mount destinations on Linux
Browse files Browse the repository at this point in the history
We tried to make runc enforce abs dest path several times, and always
had to revert it due to some tools not yet doing it. The last occurrence
is this one:
	opencontainers/runc#3944 (comment)

I don't see any reason to force abs dst paths on Linux, as far as I know
there is no security bug nor anything. Let's just relax the spec
wording, matching all the runtimes behavior when the paths is relative,
and be done with it.

Signed-off-by: Rodrigo Campos <[email protected]>
  • Loading branch information
rata committed Sep 7, 2023
1 parent f329913 commit efd5a59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M

* **`destination`** (string, REQUIRED) Destination of mount point: path inside container.
This value MUST be an absolute path.
* Linux: It MAY be a relative path too, in which case it MUST be relative to "/".
* Windows: one mount destination MUST NOT be nested within another mount (e.g., c:\\foo and c:\\foo\\bar).
* Solaris: corresponds to "dir" of the fs resource in [zonecfg(1M)][zonecfg.1m].
* **`source`** (string, OPTIONAL) A device name, but can also be a file or directory name for bind mounts or a dummy.
Expand Down

0 comments on commit efd5a59

Please sign in to comment.