Skip to content

Commit

Permalink
Fix check for gid being less than 0
Browse files Browse the repository at this point in the history
We were checking the uid instead of the gid when we check the configured value against 0
  • Loading branch information
ashrayjain committed Feb 9, 2024
1 parent e5cd767 commit d0dfefa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit d0dfefa

Please sign in to comment.