Skip to content

Clarification about symbolic and hardlink rules #857

@vsoch

Description

@vsoch

Hi OCI! We are putting together some topics for clarification about the specs, and want to start sharing them slowly for discussion and possibly updating spec docs to have more clarification. For this point:

https://supercontainers.github.io/containers-wg/ideas/links_B6/

We are suggesting that the spec have more clarification with respect to how to deal with different kinds of links, as what to do in different situations is under-specified. For example:

  1. When should symlinks be followed and when should they not?
  2. Behavior of link replacement in a later layer is explicitly undefined.
  3. Is it permitted to have a link that climbs outside the image? (E.g.: ln -s ../foo /bar). What about other pathological link targets?

One interesting quirk is that symlinks need to be interpreted relative to the image’s root, which makes non-containerized code trickier. For reference, it looks like the relative section is here: https://github.com/opencontainers/image-spec/blob/master/layer.md#hardlinks. Could we talk about a plan to clarify some of these points? Thank you!

cc @reidpr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions