From 4297a39d037a0eeae60004a7dec5a661477c49cb Mon Sep 17 00:00:00 2001 From: Jonathan Gold Date: Thu, 13 Dec 2018 22:53:40 -0500 Subject: [PATCH] engine: resources: group: Make group edgeable This adds the edgeable trait to the group resource and adds an AutoEdges method which returns nil, nil. These changes are necessary to allow UserRes to make autoedges to GroupRes. --- engine/resources/group.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/resources/group.go b/engine/resources/group.go index 07c6a1fc..a5efaee0 100644 --- a/engine/resources/group.go +++ b/engine/resources/group.go @@ -41,6 +41,7 @@ const groupFile = "/etc/group" // GroupRes is a user group resource. type GroupRes struct { traits.Base // add the base methods without re-implementation + traits.Edgeable init *engine.Init @@ -266,6 +267,11 @@ type GroupUID struct { gid *uint32 } +// AutoEdges returns the AutoEdge interface. +func (obj *GroupRes) AutoEdges() (engine.AutoEdge, error) { + return nil, nil +} + // IFF aka if and only if they are equivalent, return true. If not, false. func (obj *GroupUID) IFF(uid engine.ResUID) bool { res, ok := uid.(*GroupUID)