podman/pkg/machine/qemu
Christophe Fergeau 8e56a5605f machine: Fix check which is always true
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>
2022-07-26 09:12:27 +02:00
..
claim_darwin.go Initial implementation of mac forwarding using a privileged docker sock claim helper 2022-02-16 03:49:17 -06:00
claim_unsupported.go Initial implementation of mac forwarding using a privileged docker sock claim helper 2022-02-16 03:49:17 -06:00
config.go Make `podman machine stop` wait for qemu to exit 2022-06-28 13:28:38 -04:00
config_test.go pkg/machine: add missing build tags to tests 2022-07-04 18:09:30 +02:00
machine.go machine: Fix check which is always true 2022-07-26 09:12:27 +02:00
machine_test.go pkg/machine: add missing build tags to tests 2022-07-04 18:09:30 +02:00
machine_unsupported.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
options_darwin.go Fix #11418 - Default TMPDIR to /tmp on OS X 2021-09-04 08:40:57 +02:00
options_darwin_amd64.go Fix warning of unsupported feature on MacOS 2021-09-06 09:55:24 -07:00
options_darwin_arm64.go Merge pull request #14324 from anjannath/qemu-test 2022-06-14 18:02:27 +00:00
options_linux.go bump go module to version 4 2022-01-18 12:47:07 +01:00
options_linux_amd64.go Add machine support for more Linux distros 2021-03-28 13:35:56 +02:00
options_linux_arm64.go Add machine support for qemu-system-aarch64 2021-03-29 21:53:48 +02:00