Is it necessary to have a background in philosophy in order to get a position in logic in philosophy departments? What the title asks.

Apparently there are some professors in departments of philosophy working on logic or semantics (e.g. William Starr or Nino Cocchiarella [retired]). Does one need to know the "real philosophy" to get such kinds of positions in departments of philosophy? Or does one only need to know logic/semantics (and not, say, treatises of Plato)? And does one have to have a PhD in philosophy, or does a PhD in math or linguistic suffice?
The correct, if not very useful, answer to the title question is no, not absolutely necessary. But philosophy departments aren't likely to advertise very often for mathematicians or computer scientists grounded in computability (an important topic in epistemology). 

Like any other modern academic field, philosophy has specialization, and some departments are very specialized. So, with certain skills, but not a broad knowledge of the foundations of philosophy you would find a few positions open, but I suspect they would be rare. 

Being specialized is both a blessing and a curse. The curse comes because you might not be suitable to teach the courses that need teaching, but the blessing is that you know how to go deep into some important topics. 

If you have a degree already in math, philosophy might present an option if the right position came along. But it would probably be a mistake to try to build a career on the assumption that it would be easy to do so. 

Also, of course, if you just love it, there is no real reason why a mathematician or linguist can't enter into collaborative relationships with philosophers on topics of common interest. Such relationships can be highly productive.