From d0dfefac14ccf04752ff2b227d2ec349c5030d6e Mon Sep 17 00:00:00 2001 From: Ashray Jain Date: Thu, 8 Feb 2024 17:04:03 -0800 Subject: [PATCH] Fix check for gid being less than 0 We were checking the uid instead of the gid when we check the configured value against 0 --- pkg/driver/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go index 031738208..e0d2dea77 100644 --- a/pkg/driver/controller.go +++ b/pkg/driver/controller.go @@ -183,7 +183,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "Failed to parse invalid %v: %v", Gid, err) } - if uid < 0 { + if gid < 0 { return nil, status.Errorf(codes.InvalidArgument, "%v must be greater or equal than 0", Gid) } }