an officer assigned to the judge advocate general
a staff officer serving as legal adviser to a military commander