Also under Virginia law, only sheriffs and duly deputized officers are permitted to execute certain law enforcement functions, such as working in the courts, booking offenders into jails and other holding facilities, and serving certain classes of warrants.