spiegel_podman/pkg/machine
Christophe Fergeau c3e0f8ebef 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 14:45:12 -04:00
..
e2e fix broken machine test 2022-07-26 14:24:49 -04:00
qemu machine: Fix check which is always true 2022-07-26 14:45:12 -04:00
wsl Fixes #14698 Use prepared image for WSL2 machine init 2022-07-26 13:19:48 -04:00
config.go Clean up cached machine images 2022-07-26 13:32:33 -04:00
config_test.go pkg/machine: add missing build tags to tests 2022-07-04 18:09:30 +02:00
connection.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
fcos.go Clean up cached machine images 2022-07-26 13:32:33 -04:00
fedora.go Fix potential leak on mid-stream read error 2022-07-26 13:49:22 -04:00
ignition.go Fix spelling "setup" -> "set up" and similar 2022-06-22 18:39:21 +02:00
ignition_darwin.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_linux.go Set machine timezone 2021-12-16 12:40:20 -06:00
ignition_schema.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_windows.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
keys.go Machine init: create .ssh dir if not exist 2022-07-26 13:29:40 -04:00
machine_unsupported.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
pull.go Print rootfs download as a specific version on Win 2022-07-26 13:35:56 -04:00