From 6122bc8beba8b73ee88c0f235a205672fc4a1c93 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Tue, 20 Apr 2021 11:00:33 +0800 Subject: [PATCH] Privatize NewUserSystemDbus Signed-off-by: Shiming Zhang Signed-off-by: Kir Kolyshkin --- libcontainer/cgroups/systemd/dbus.go | 2 +- libcontainer/cgroups/systemd/user.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libcontainer/cgroups/systemd/dbus.go b/libcontainer/cgroups/systemd/dbus.go index 21ead22b9d7..7184bcd4d00 100644 --- a/libcontainer/cgroups/systemd/dbus.go +++ b/libcontainer/cgroups/systemd/dbus.go @@ -55,7 +55,7 @@ func (d *dbusConnManager) getConnection() (*systemdDbus.Conn, error) { func (d *dbusConnManager) newConnection() (*systemdDbus.Conn, error) { if d.rootless { - return NewUserSystemdDbus() + return newUserSystemdDbus() } return systemdDbus.NewWithContext(context.TODO()) } diff --git a/libcontainer/cgroups/systemd/user.go b/libcontainer/cgroups/systemd/user.go index 450a2469402..ddeaf664263 100644 --- a/libcontainer/cgroups/systemd/user.go +++ b/libcontainer/cgroups/systemd/user.go @@ -17,8 +17,8 @@ import ( "github.com/pkg/errors" ) -// NewUserSystemdDbus creates a connection for systemd user-instance. -func NewUserSystemdDbus() (*systemdDbus.Conn, error) { +// newUserSystemdDbus creates a connection for systemd user-instance. +func newUserSystemdDbus() (*systemdDbus.Conn, error) { addr, err := DetectUserDbusSessionBusAddress() if err != nil { return nil, err