No prisoner participating in a work release program shall be deemed an agent, employee or involuntary servant of the county while released from the jail of confinement pursuant to the terms of any work release plan; provided, however, that when a prisoner is employed by the state or a local municipality, his relationship to the state or local municipality arising out of such employment shall be determined in the same manner as if he were a free person so employed.
N.Y. Correct.Law § 877