Here in Pa, it is a crime to have relations with inmates while holding a position as a prison guard. I'm not sure what the punishment is if caught. Several friends of mine are guards; I will have to ask them.
We had a female officer, 3 months out of the academy, start a relationship with an inmate, a high ranking blood, and she started bringing in razor blades to put into the cells of rival gang members and then dropped a snitch note telling us about it so they would find these blades. She was taken away in cuffs when they had the goods on her. Now, think about this for a moment before I tell you her sanctions. She brought in razor blades effectively putting everyone in the institution in danger be they officer, civilian, inmate not to mention that she was having sex with an inmate on state time violating the law. After all was said and done, her sanction was 4 years probation. Had the genders been reversed, a make officer would have gotten time.