As an US military general officer you may:
and then you may even get a promotion.
But as a general officer you may never ever have an extramarital affair with a private citizen. Especially not while your divorce is still pending and you are only six month away from retirement. If caught, you will be relieved from your command immediately.
4-Star General Relieved Of Duty
[General] Byrnes, reached by telephone at his home yesterday, declined to comment. His defense attorney, Lt. Col. David H. Robertson, said the allegation against Byrnes involves an affair with a private citizen. Byrnes has been separated from his wife since May 2004; their divorce was finalized on Monday, coincidentally the same day he was relieved of command, Robertson said.
…
The Army has been hurt over the past year by detainee-abuse cases and has been accused of not going after top officers allegedly involved in such abuse. Army officials said relieving Byrnes was meant to show the public that the service takes issues of integrity seriously.
This is a sure way to destroy the small rest of moral fabric left in the US Army. And it´s not done by chance. Like the Plame leak this is supposed to send a message.
You are not safe. We, the civilian leadership can get at you. No matter how high your rank or how small your failure. You serve at "our pleasure".