mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #2916 from thaJeztah/replace_deprecated_dbus
libcontainer/cgroups/systemd: replace use of deprecated dbus.New()
This commit is contained in:
@@ -2,6 +2,7 @@ package systemd
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
@@ -298,7 +299,7 @@ func getDbusConnection(rootless bool) (*systemdDbus.Conn, error) {
|
||||
if rootless {
|
||||
connDbus, connErr = NewUserSystemdDbus()
|
||||
} else {
|
||||
connDbus, connErr = systemdDbus.New()
|
||||
connDbus, connErr = systemdDbus.NewWithContext(context.TODO())
|
||||
}
|
||||
})
|
||||
return connDbus, connErr
|
||||
|
||||
Reference in New Issue
Block a user