From 09e53bfd3f50637d8917034ef313e6ddc2d37522 Mon Sep 17 00:00:00 2001 From: Cian Yong Leow Date: Mon, 17 Jun 2024 13:52:04 +0100 Subject: [PATCH] engine: resources: file: Remove Validate owner/group Checks The owner/group of a file should not be validated on the host until runtime. This removes the checks in Validate() that were happening before the execution of the resource graph (and therefore bound to fail if the system was being bootstrapped). --- engine/resources/file.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/engine/resources/file.go b/engine/resources/file.go index 6e974d6a..e51baf24 100644 --- a/engine/resources/file.go +++ b/engine/resources/file.go @@ -352,13 +352,6 @@ func (obj *FileRes) Validate() error { return fmt.Errorf("can't set Owner or Group on this platform") } } - if _, err := engineUtil.GetUID(obj.Owner); obj.Owner != "" && err != nil { - return err - } - - if _, err := engineUtil.GetGID(obj.Group); obj.Group != "" && err != nil { - return err - } // TODO: should we silently ignore this error or include it? //if obj.State == FileStateAbsent && obj.Mode != "" {