§ 1012. Who may be joined as defendants. 1. In either of the cases specified in section 1011, any other person claiming title to, or the right to the possession of, the real property in which dower is claimed may be joined as defendant in the action.
2. The people of the state of New York may be made a party defendant in an action for dower where the people of the state of New York have an interest in or a lien upon the lands affected thereby, in the same manner as a private person. In such a case the summons must be served upon the attorney-general, who must appear in behalf of the people. But where the people of the state of New York are made a party defendant, as herein provided, the complaint shall set forth, in addition to the other matters required, detailed facts showing the particular nature of the interest in or the lien on the said real property of the people of the state of New York and the reason for making the people a party defendant. Upon failure to state such facts the complaint shall be dismissed as to the people of the state of New York.