(container podman.Container)
| 511 | } |
| 512 | |
| 513 | func callFlatpakSessionHelper(container podman.Container) error { |
| 514 | name := container.Name() |
| 515 | logrus.Debugf("Inspecting mounts of container %s", name) |
| 516 | |
| 517 | var needsFlatpakSessionHelper bool |
| 518 | |
| 519 | mounts := container.Mounts() |
| 520 | for _, mount := range mounts { |
| 521 | if mount == "/run/host/monitor" { |
| 522 | logrus.Debug("Requires org.freedesktop.Flatpak.SessionHelper") |
| 523 | needsFlatpakSessionHelper = true |
| 524 | break |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | if !needsFlatpakSessionHelper { |
| 529 | return nil |
| 530 | } |
| 531 | |
| 532 | fmt.Fprintf(os.Stderr, "Warning: container %s uses deprecated features\n", name) |
| 533 | fmt.Fprintf(os.Stderr, "Consider recreating it with Toolbx version 0.0.97 or newer.\n") |
| 534 | |
| 535 | if _, err := utils.CallFlatpakSessionHelper(); err != nil { |
| 536 | return err |
| 537 | } |
| 538 | |
| 539 | return nil |
| 540 | } |
| 541 | |
| 542 | func constructCapShArgs(command []string, useLoginShell bool) []string { |
| 543 | capShArgs := []string{"capsh", "--caps=", "--"} |
no test coverage detected
searching dependent graphs…