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> |
||
|---|---|---|
| .. | ||
| e2e | ||
| qemu | ||
| wsl | ||
| config.go | ||
| config_test.go | ||
| connection.go | ||
| fcos.go | ||
| fedora.go | ||
| ignition.go | ||
| ignition_darwin.go | ||
| ignition_linux.go | ||
| ignition_schema.go | ||
| ignition_windows.go | ||
| keys.go | ||
| machine_unsupported.go | ||
| pull.go | ||