
264 Cal.App.2d 915 (1968)
HOWARD ENGELMAN et al., Plaintiffs and Respondents,
v.
E. H. BOOKASTA, Defendant and Appellant.
Civ. No. 31527. 
California Court of Appeals. Second Dist., Div. Three.  
Aug. 14, 1968.
 Gold, Herscher & Taback, and Daniel M. Herscher for Defendant and Appellant.
 Harold Rubins for Plaintiffs and Respondents.
 SHINN, J.  [fn. *]
 The appeal is from an order denying a motion of defendant Bookasta for discharge of an attachment. The ground of the motion was that the attachment had been irregularly and improperly issued. [1] Appellant has advanced no sound reason for questioning the order denying his motion. We believe the court ruled correctly and that we must affirm the order.
 In the hearing on the motion appellant contended, and he here contends, that the debt upon which the suit was brought was secured by a deed of trust upon real property and an *916 assignment of rents and, therefore, was not an obligation on which suit could be brought and an attachment could issue under section 537, subdivision 1 of the Code of Civil Procedure.
 The facts were the following:plaintiffs are a partnership doing business under the fictitious name of Mortgage and Equity Investment Company. The partnership is the payee of a note in the original sum of $100,000 issued by Orange Empire Productions, Inc., and the beneficiary of a trust deed on real property and an assignment of rents given as security for payment of the note. Appellant executed an agreement of guaranty by which he agreed to pay the note according to its terms. The action is upon this agreement; the amount of the attachment is $94,567.38 and it was levied upon real property of appellant.
 Since no distinction exists between the rights of sureties and guarantors (Civ. Code,  2787), appellant, as a guarantor, had the right of a surety granted by sections 2845 and 2849 of the Civil Code to require the creditor to proceed against the principal or pursue any other remedy in his power the surety could not himself pursue, and he was entitled to the benefit of every security for performance of the principal obligation held by the creditor. These rights were waived by appellant in a written agreement of guaranty in the following language: "I hereby waive, for myself and for all other persons, (a) demand and protest, (b) all right to assert or plead at any time any statute of limitations as or relating to the written instrument, and (c) any right to require the holder of the within instrument to proceed against the maker or against any other person or to apply any security it may hold, or to proceed to first exhaust any security it may hold or to pursue any other remedy."
 Respondents rely upon the waiver as support for their right to sue and attach on the agreement of guaranty without having had recourse to the security of the trust deed. They claim that by virtue of the waiver they could truthfully assert in their affidavit for attachment that the obligation upon which they sue is not secured.
 Appellant does not deny that the waiver which he signed, if valid, would deprive him of the benefits of sections 2845 and 2849 of the Civil Code. He contends that the waiver is void as opposed to public policy. He must take this position in order to escape from the effects of the waiver, inasmuch as it is valid unless contrary to public policy, as provided in section *917 2787 of the Civil Code. However, appellant contends that even though he waived his right to require the creditors to resort to the security they held, and even if they could sue without foreclosing, they yet had no right to attach. These are the questions presented by the briefs.
 Appellant has been unable to cite a case in which it was held that a guarantor or surety cannot validly waive the protection provided by sections 2845 and 2849 of the Civil Code. He refers to section 726 of the Code of Civil Procedure which requires that mortgages must be foreclosed through court action, to section 580a, Code of Civil Procedure, which places limitations upon the right to deficiency judgments, and to sections 2924, 2924b and 2924c of the Civil Code which outline the procedure for the foreclosure of trust deeds on real property, and he argues that these enactments which afford debtors protection in the foreclosure of their property rights establish a public policy that all secured creditors must exhaust the security before taking other measures to enforce collection. Appellant cites section 2953 of the Civil Code which provides that any agreement to waive the rights and privileges of sections 726 and 580a of the Code of Civil Procedure and sections 2924, 2924b and 2924c of the Civil Code shall be void and of no effect and he urges that the courts should extend the prohibition of waivers to rights under sections 2845 and 2849.
 It must be presumed that before selecting the rights and privileges of debtors that should not be waived the Legislature considered the rights of all debtors whose obligations are secured and purposely refrained from legislating as to procedure to be followed by creditors, other than by foreclosure for the reason that with respect to other methods of collection there should be no interference with the right of contract.
 Section 2953 was enacted in 1937. Rights of sureties under sections 2845 and 2849 have existed ever since they were created in 1872 and the Legislature has not included such rights with others that cannot be waived. Appellant's reliance upon the legislation he cites is unfortunate; it emphasizes the fact that the declaration of public policy which he thinks is to be found there is not there at all.
 A claim of invalidity of the waiver here urged by appellant was ruled upon in American Guaranty Corp. v. Stoody, 230 Cal.App.2d 390 [41 Cal.Rptr. 69], adversely to his contention. A lessee had an obligation to pay rent, including payments on *918 certain equipment contracts; Stoody had executed in favor of the lessor, a continuing guaranty of the obligations of the lessee.plaintiff, as assignee of the lessor, sued Stoody for breach of the contract of guaranty, claiming the amount of payments the lessee had failed to make; an attachment was levied on the property of Stoody; he made a motion to discharge the attachment, the motion was denied and he appealed.
 It was contended on the appeal that the attachment was issued irregularly and in violation of public policy because the debt was secured and the creditor had to look to the security before suing and attaching. The plaintiff replied that by the agreement of guaranty of the debt Stoody had waived the right to require the guarantee to proceed against the lessees. In arguing that the waiver was void Stoody relied upon dictum in a footnote in Lencioni v. Dan, 128 Cal.App.2d 105 [275 P.2d 101], which stated that it could be argued that it would violate the policy of the law to permit a creditor to waive his security and sue and attach property of the debtor.
 The argument which was mentioned in the dictum as one that could be made, was made in American Guaranty and was rejected by the court's action if not by express statement. The court stated it could see no reason why a guarantor should not be permitted to waive his right by contract to require the creditor to proceed against security provided by the principal debtor. There is no material difference between the waiver in that case and the one in the present case. We interpret defendant's waiver as expressing an intention to waive any and all rights arising out of or incidental to the existence of the security given by Orange Empire Productions, Inc. The waiver was without limitation, and it constituted a contract between the plaintiffs and the defendant that for all purposes the debt of the defendant created by his guaranty was to be considered as unsecured. We do not see how the defendant could oppose the right of plaintiffs to attach, upon the claim that his obligation was secured, without relying upon rights he had waived. His claim that his debt was secured must fail. For the reasons we have stated we hold that appellant's waiver was valid and sufficient for all purposes. It follows that appellant's obligation was not secured and that the plaintiffs had a right to sue and to attach under section 537, subdivision 1 of the Code of Civil Procedure.
 The order is affirmed.
 Ford, P. J., and Moss, J., concurred.
NOTES
[fn. *]  *. Retired Presiding Justice of the Court of Appeal sitting under assignment by the Chairman of the Judicial Council.
