Where no provision is made by statute for security on a preliminary injunction or temporary restraining order, the court shall require a written undertaking on the part of the applicant with or without sureties in such sum as the court deems proper, to the effect that the applicant will pay to the party enjoined such costs and damages not exceeding the amount to be specified, as he may sustain by reason of the preliminary injunction or temporary restraining order, if the court finally decides that the applicant was not entitled thereto. The damages may be ascertained by reference or otherwise as the court shall direct. No such security shall be required of the State of South Dakota or of an officer or agency thereof.
SDCL 15-6-65(c)