spiegel_podman/cmd/podman/machine/machine_unix.go
Brent Baude 2cc3be7332
RUN-4539: Change podman module paths
The podman module paths are moving from github.com/containers/podman to
go.podman.io/podman.  This will help with future mobility.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2026-04-22 14:02:25 -05:00

22 lines
497 B
Go

//go:build linux || aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || netbsd || openbsd || solaris
package machine
import (
"fmt"
"os"
"github.com/spf13/cobra"
"go.podman.io/podman/v6/pkg/rootless"
)
func isUnixSocket(file os.DirEntry) bool {
return file.Type()&os.ModeSocket != 0
}
func rootlessOnly(cmd *cobra.Command, _ []string) error {
if !rootless.IsRootless() {
return fmt.Errorf("cannot run command %q as root", cmd.CommandPath())
}
return nil
}