legal protections for officers