Entering into premises without the consent of a person living therein, committed by a person holding a state function or public service during the exercise of his duty, except the cases when it is permitted by law, is punishable by a fine or up to five years of imprisonment.