if an enlisted person would have done this they would get ten years in Levenworth. When I was stationed at Keesler AFB the commanding general, the Wing Commander was discovered hosting swinger parties in one section of the BOQ reserved exclusively for his use. Keesler is a training center for the AF for things like ADMIN etc and he had civilians working for him going through the attractive female students offering them easy duty permanent station there if they wanted to party with their group. This was no secret on the base. Everyone knew it. Long story short the General was offered early retirement with full benefits and the people working for him in his escapade were all fired. IN this respect the military is a microcosm of real life in America.
http://www.cnn.com/2016/10/17/politics/general-cartwright-pleads-guilty-leaking-information/
http://www.cnn.com/2016/10/17/politics/general-cartwright-pleads-guilty-leaking-information/