(1) It is unlawful for any county-housed state inmate or county prisoner or prisoners to be leased or hired to any individual or corporation for any purpose whatsoever. Nor shall they be worked under any contractor; but in working them on county farms, or on the public roads or on any other work, which work must be of an exclusively public character, they shall be under exclusive official control and management.
(2)
(a) It is lawful for a state, county or municipality to provide prisoners for public service work for nonprofit charitable organizations as defined under Section 501(c)(3) of the Internal Revenue Code if that nonprofit charitable organization provides food to charities. In addition, it is lawful for a state, county or municipality to provide prisoners for public service work for churches according to criteria approved by the Department of Corrections.
(b) The prisoners participating in the public service work under paragraph (a) shall remain under the exclusive control and management of the county or municipality.
(c) A prisoner performing public service work under this subsection shall be entitled to earned credits as provided under this chapter.