The board of supervisors of any county may, by resolution, establish a department of corrections, to be headed by an officer appointed by the board, which shall have jurisdiction over all county functions, personnel, and facilities, or so many as the board names in its resolution, relating to institutional punishment, care, treatment, and rehabilitation of prisoners, including, but not limited to, the county jail and industrial farms and road camps, their functions and personnel.
The boards of supervisors of two or more counties may, by agreement and the enactment of ordinances in conformity thereto, establish a joint department of corrections to serve all the counties included in the agreement, to be headed by an officer appointed by the boards jointly.
Ca. Gov. Code § 23013