Skip to content

When using :z mount option, avoid relabeling files with lsetxattr() unless required #14786

@jkroon81

Description

@jkroon81

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When using ":z" mount option, podman will recursively relabel the SELinux context of all mounted files, causing the "Change" timestamp to be updated, even if the files would have the correct SELinux context to begin with. This is not so great since it tricks tools like git/gitk into thinking that the file content might have changed. Also I guess it inflicts a little more "wear and tear" on the disk.

Output of podman version:

Client:       Podman Engine
Version:      4.1.1
API Version:  4.1.1
Go Version:   go1.18.3
Built:        Wed Jun 15 16:31:58 2022
OS/Arch:      linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.stale-issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions