123. It shall be lawful for the Director of Prisons appointed under section 20 of the Prisons Act (Cap. 247) or any Superintendent of Prisons, in accordance with any regulations made under this Act, to receive any person —
sentenced by a subordinate military court duly sent to him in pursuance of such regulations and to confine him until execution of the sentence is completed or the prisoner is discharged or delivered over in due course of law;
delivered into his custody as a deserter or absentee without leave by any person conveying him under legal authority on production of a warrant of a magistrate on which such deserter or absentee without leave has been taken or committed; and
in military custody and detain him for a period not exceeding 7 days.