Section 107(5) in The Naval Ceremonial, Conditions Of Service And Miscellaneous Regulations, 1964
(5)The Officer of the Guard with his pendant flying shall be saluted by all officers of junior rank, as in the case of Captain with his pendant flying. The Officer of the Guard will salute all officers senior to himself.