I believe the cops were required to get a warrant from a county judge, weren't they?
Read the documents at the linked article. Although the judge authorized an "anal cavity search", a jury will likely find that the scope of what the cops did went far beyond what was authorized.