Skip to content

Commit

Permalink
Merge pull request #1726 from giuseppe/fix-podman-freebsd
Browse files Browse the repository at this point in the history
cgroups: provide UserConnection for non-linux platforms
  • Loading branch information
openshift-ci[bot] committed Nov 2, 2023
2 parents 8354404 + 76743c4 commit 6a67921
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cgroups/cgroups_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
package cgroups

import (
"fmt"
"os"

systemdDbus "github.com/coreos/go-systemd/v22/dbus"
)

// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
Expand All @@ -21,3 +24,8 @@ func UserOwnsCurrentSystemdCgroup() (bool, error) {
func rmDirRecursively(path string) error {
return os.RemoveAll(path)
}

// UserConnection returns an user connection to D-BUS
func UserConnection(uid int) (*systemdDbus.Conn, error) {
return nil, fmt.Errorf("systemd d-bus is not supported on this platform")
}

0 comments on commit 6a67921

Please sign in to comment.