The Board of Supervisors of Buchanan County is hereby authorized to maintain roadways located within the right-of-way of railroads pursuant to an agreement between Buchanan County and the railroad. However, nothing in this section shall obligate Buchanan County or the railroad to enter into any such agreement, nor shall Buchanan County or the railroad be precluded from including in any agreement any term, condition, or other lawful contractual provision. Any agreement made between Buchanan County and a railroad shall result in the complete immunity of the railroad from suit for any acts of the County in maintaining the roadways within the right-of-way of the railroad. The Board of Supervisors of Buchanan County shall cause all such roadways to be appropriately posted to warn users of such roadways that they are present on such roadways at their own risk.
Va. Code § 56-412.3