mirror of https://github.com/containers/podman.git
Before making / mutable/immutable, podman-machine checks if the mount is being done in /home or /mnt. However the current check is always going to be true: ``` !strings.HasPrefix(mount.Target, "/home") || !strings.HasPrefix(mount.Target, "/mnt") ``` is false when mount.Target starts with "/home" and mount.Target starts with "/mnt", which cannot happen at the same time. The correct check is: ``` !strings.HasPrefix(mount.Target, "/home") && !strings.HasPrefix(mount.Target, "/mnt") ``` which can also be written as: ``` !(strings.HasPrefix(mount.Target, "/home") || strings.HasPrefix(mount.Target, "/mnt")) ``` The impact is not too bad, it results in extra 'chattr -i' calls which should be unneeded. [NO NEW TESTS NEEDED] Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> |
||
---|---|---|
.. | ||
claim_darwin.go | ||
claim_unsupported.go | ||
config.go | ||
config_test.go | ||
machine.go | ||
machine_test.go | ||
machine_unsupported.go | ||
options_darwin.go | ||
options_darwin_amd64.go | ||
options_darwin_arm64.go | ||
options_linux.go | ||
options_linux_amd64.go | ||
options_linux_arm64.go |