This action is wholly based upon the contract as stated in' the undertaking given by the defendants to the county of Tompkins. The Court of Appeals, in speaking of an instrument under seal, and the right to maintain an action thereon, has said: “ But where an instrument is under seal no person can sue or be sued to enforce the covenants therein contained, except those who are named as parties to the instrument and who signed and sealed the same.” (Henricus v. Englert, 137 N. Y. 488.)
The undertaking now under consideration seems to be included among the instruments so mentioned by our court of last resort, and the plaintiffs not having been named as parties thereto cannot, therefore, maintain this action, unless their right so to maintain the same is given by some statutory authority controlling upon the parties signing the instrument.
The provisions of section 1888 of the Code of Civil Procedure do not apply to the alleged claim of the plaintiffs in this action. Said section provides as follows: “ Where a public officer is required to give an official bond to the People, and special provision is not made by law for the prosecution of the bond by or for the benefit of a person who has sustained, by his default, delinquency or misconduct, an injury for which the sureties* upon the bond are liable, such a person may apply for leave to prosecute the delinquent’s official bond.”
The undertaking signed by the defendants was not given to “ the People,” and is not included within the letter of said section. Section 1887 provides in what cases leave of the court maybe obtained by persons other than the obligee on a county treasurer’s bond to bring an action thereon. The plaintiffs are not included within the provisions of that section. The supervisors of the several towns are by statute (Laws of 1894, chap. 556, tit. 3, § 4, as amd. by Laws of 1896, chap. 177) made the temporary custodians of the school *308money and the intermediaries for its payment for the benefit of the several school districts. Yo statutory authority has been called to our attention for towns or the supervisors of towns to bring an action On the county treasurer’s bond, where default has been made in the payment of school money. Ample remedy is afforded to such school districts and the supervisors of towns in which they are situated, without such an action. It is suggested by the appellants that the defendants should have demurred to the plaintiffs’ complaint on the ground that the plaintiffs did mot have legal capacity to sue, and that having failed to so demur to the plaintiffs’ complaint, they have waived any objection to the plaintiffs maintaining this action. The defendants’ objection to the plaintiffs maintaining this action is one relating to the substance of the cause of action itself, and not simply to the legal capacity of the plaintiffs to sue. The complaint did not state, and the proof does not show, facts sufficient to constitute a'cause of action in behalf of the plaintiffs against the defendants and the complaint was, therefore, properly dismissed. The judgment should be affirmed, with costs.
' Judgment unanimously affirmed, with costs.