
228 Cal.App.3d 92 (1991)
278 Cal. Rptr. 758
DOMINIC BRUSSO et al., Plaintiffs and Appellants,
v.
RUNNING SPRINGS COUNTRY CLUB, INC., et al., Defendants and Respondents.
Docket No. E007267.
Court of Appeals of California, Fourth District, Division Two.
March 4, 1991.
*96 COUNSEL
Paula Forthun for Plaintiffs and Appellants.
Sprague, Tomlinson & Nydam and William O. Carlisle for Defendants and Respondents.
[Opinion certified for partial publication.[*]]
OPINION
McDANIEL J.[*]
Minority shareholders (plaintiffs) sued majority shareholders, the officers and directors of a corporation (defendants), in a shareholder derivative action, alleging, among other things, breach of contract. Defendants cross-claimed against plaintiffs. After a consolidated trial, the trial court ruled for defendants on the complaint and for plaintiffs on the cross-complaint. On motions by both parties, the court awarded defendants attorney's fees pursuant to Civil Code section 1717. Plaintiffs have appealed the attorney's fees award, arguing that Corporations Code section 800, which creates the shareholders' derivative right of action, exclusively governs the award of attorney's fees, with the result that plaintiffs not defendants should have been awarded fees. In our view section 1717 of the Civil Code is controlling, and we shall affirm the award of attorney's fees to defendants against plaintiffs individually.

FACTUAL AND PROCEDURAL HISTORY
The record shows that the suit concerns the Running Springs Country Club, a California corporation (the corporation), located in Running *97 Springs, California. Its assets consist of real property, a clubhouse-restaurant, outbuildings and a pool. The corporation's liabilities amount to about $40,000, plus delinquent property taxes. After its review of the figures, the trial court found the corporation had been losing money and was obligated to borrow from shareholders to keep operating.
The facts surrounding the present dispute are complex. In 1979, the corporation, as seller, entered into an "Agreement for Purchase and Sale of Stock" (the purchase agreement) with W.E. and Cora Jean Clark, Reginald D. Swanson, Jerry A. Swanson (the Clark Group), together with two others not parties to this appeal, as buyers. This purchase agreement provided that the corporation would issue sufficient shares of its stock to afford the buyers a majority interest in the corporation in exchange for buyers' delivery of $30,000 and a $50,000 noninterest bearing promissory note, and buyers' assumption of guaranties on a $70,000 note payable to the Bank of America. The purchase agreement was signed by Clifford D. Chandler, as president of the corporation. This agreement also contained an individual warranty clause at the end of the signature page. Both Clifford D. Chandler and Dominic Brusso signed the individual warranty, but the signatures do not indicate that they were subscribed in the signatories' official capacities.
The agreement further provided that defendant William Clark would manage all corporate facilities pursuant to a management agreement with the corporation. By its terms the management contract became "an integral and material part of" the purchase agreement.
The corporation also leased the property known as the "Clubhouse Restaurant" and equipment, furniture and fixtures located there, to William Clark for a period of three years with a two-year option to renew. He was to operate the restaurant for the corporation's benefit. Performance shares were to be issued to the buyers based on certain financial goals the restaurant was to meet. The business known as the "Clubhouse Restaurant" was licensed for sale of wine and beer. William Clark was to obtain a liquor license to be used at the "Clubhouse Restaurant."
The purchase agreement provided for payment of attorney's fees in a suit for default. Paragraph 11 thereof accords attorney's fees to the prevailing party incurred in a suit for default or breach of any covenant contained in the agreement. Although the purchase agreement was amended twice, neither paragraph 11 nor the individual warranties were altered or deleted by such amendments. The lease also provided for attorney's fees to the prevailing party in any action to enforce any covenant or agreement therein.
In 1985, plaintiffs, Dominic Brusso, Clifford and Joyce Chandler, Don and Inez Huston, and Robert E. Kinsey as trustee for James and Anita *98 Brusso, brought a shareholders' derivative suit against the corporation and the Clark Group. At the time of suit, the members of the Clark Group were majority stockholders and directors or officers of the corporation, while plaintiffs held a minority of shares. The Clark Group filed a cross-complaint.
In the first of nine causes of action, the second amended complaint alleged that the Clark Group had breached its purchase agreement and management agreement with the corporation. The trial court summed up the plaintiffs' allegations as follows:
"1. William Clark breached the management agreement in that he failed to manage the restaurant for the Corporation's benefit;
"2. The Clarks and Swansons breached the purchase agreement in that they failed or refused to transfer the liquor license, provide an accounting, provide the requested financial records, denied access to those records, and wrongfully demanded the issuance of performance shares;
"3. The Clarks breached the lease by failing to pay the rent as required, and failing to negotiate a new lease;
"4. William and Cora Clark breached their fiduciary duty to the Corporation by not renewing the lease, not paying a reasonable rent after expiration of the lease term, ... and failing to pay obligations to the Bank of America;
"5. The Corporation is entitled to the `restaurant';
"6. The Clarks are not entitled to performance shares;
".... .... .... .... ....
"8. The Corporation is entitled to the liquor license;
"9. The Clarks converted in excess of $80,000 in that they made unauthorized expenditures of corporate funds and failed to collect the rent due on the restaurant lease;
"10. The Clarks and Swansons fraudulently induced the board and shareholders to enter into the purchase agreement by misrepresenting their intentions regarding the liquor license; ..."
The briefs tell us that, after the suit was filed, defendants moved twice for an order requiring that a bond be posted by plaintiffs per Corporations *99 Code section 800, subdivisions (c) and (d). However, none of the documents or court proceedings with reference to the foregoing are contained in the record before us. Plaintiffs request that we take judicial notice that defendants moved for security on August 28, 1986, and October 15, 1986, and that the motions were denied.
In the bifurcated trial, an accounting was accomplished first. After the second phase of the trial, judgment was rendered as to all of the causes of action in both the second amended complaint and defendants' cross-complaint. The judgment provided that plaintiffs would take nothing on any of their causes of action; the sixth cause of action for inspection of books and records was ruled moot. Finally, the court determined that defendant cross-complainants would take nothing from plaintiffs.
After judgment was entered, both parties moved for attorney's fees. The trial court's notice of ruling on both parties' motions for their respective fees and to tax each others' costs stated in pertinent part:
"1. Defendants' Motion:
"Defendants are seeking an award of attorneys fees pursuant to Civil Code § 1717, and a provision in the stock purchases agreement. Plaintiffs claim that Corporation Code § 800 controls defendants' right to recover fees, and cite Alcott vs. M.E.V. Corporation (1987), 193 [Cal. App.3d] 797, in support of their claim.
"However, in Alcott the only basis for an award of attorneys fees was Section 800. In this case, Defendants rely on the attorneys fees provision of the stock purchase agreement and Civil Code § 1717, and claim they are entitled to fees because they were the prevailing parties on the contract. It is clear to the court that Defendants indeed prevailed on the contract which was the underlying basis for virtually all Plaintiffs' causes of action in the complaint. Therefore, they are entitled to fees as requested.
".... .... .... .... ....
"The question of who is liable for the attorneys fees is a more difficult one. Had Plaintiffs prevailed it appears they could have recovered attorneys fees from defendants on the theory that their action provided a substantial benefit to the corporation. (Fletcher v. A.J. Industries, Inc. (1968), 266 [Cal. App.2d] 313). Conversely, when plaintiffs lose a shareholder's derivative action it seems appropriate that they, not the corporation, must bear the burden of costs and attorneys fees. After all, plaintiffs undertook the action because the corporation failed to act, and, as it turned out, for good *100 reason. Therefore, they take the risk that they might have to pay if they are unsuccessful. Otherwise, they could prosecute frivolous lawsuits on the corporation's behalf without fear if only the corporation were liable.
"In conclusion, the court finds that the individual plaintiffs rather than the corporation is [sic] liable for fees and costs. Clearly plaintiffs Clifford Chandler and Dominic Brusso are individually liable by reason of signing the individual warranties. The remaining plaintiffs would similarly be liable on the theory that had they prevailed they would have been entitled to fees from defendants. Conversely, the reciprocity provision of Civil Code Section 1717, would allow defendants to recover their fees and costs against plaintiffs individually...."
In this appeal, plaintiffs argue that the trial court erred as a matter of law in: 1) awarding attorney's fees to the defendants against the individual plaintiffs under Civil Code section 1717 in a shareholder's derivative suit where Corporations Code section 800 is the exclusive remedy; 2) finding that defendants prevailed on the contract contrary to the standards of Corporations Code section 317; and 3) precluding plaintiffs from obtaining attorney's fees by failing to find that plaintiffs' suit provided a substantial benefit to the corporation.

DISCUSSION

I.


Appealability[*]
.... .... .... .... .... .

II.

Governing Statutory Authority for Attorney's Fees
At the heart of plaintiffs' appeal are Corporations Code sections 800[2] and 317. Plaintiffs contend that these sections should be the exclusive predicates *101 for granting attorney's fees in cases where the suit is derivative, and thus the trial court erred in applying Civil Code section 1717 to justify its decision to grant fees to defendants and to deny them to plaintiffs.
Code of Civil Procedure section 1021 provides the basic right to an award of attorney's fees: "Except as attorney's fees are specifically provided for by statute, the measure and mode of compensation of attorneys ... is left to the agreement, ... of the parties; ..." Corporations Code section 800 provides for a bond to be supplied by plaintiffs to cover the probable costs of defense, including fees. (Corp. Code, § 800, subd. (d).) Additionally, Civil Code section 1717 creates a reciprocal right to attorney's fees where the subject of the litigation is breach of a contract containing an attorney's fees provision. (1a) The right to attorney compensation under section 1717 is statutory as well as contractual. (T.E.D. Bearing Co. v. Walter E. Heller & Co. (1974) 38 Cal. App.3d 59, 63-64 [112 Cal. Rptr. 910].) Thus, we are faced with seemingly conflicting statutory authority for the award of attorney's fees and must determine whether Corporations Code section 800 exclusively applies, as urged by plaintiffs.
(2) Looking first to the principles of statutory interpretation for guidance, we observe that orthodox rules of statutory construction require "[i]n the absence of any express repeal or amendment, the new provision is presumed in accord with the legislative policy embodied in those prior statutes. Thus, they all should be construed together." (2A Sutherland, Statutory Construction (4th ed. 1984) § 51.02, p. 453, fns. omitted.) Presumably, when the Legislature enacted Civil Code section 1717 in 1968, it had in mind previous statutes relating to attorney's fees, such as Corporations Code section 800, first enacted in 1949. Similarly, when section 800 was amended in 1975 and later, it was done with cognizance of Civil Code section 1717.
(3) Under yet another rule of construction, when two statutes relate to the same subject matter, both are to be construed to give effect to every *102 provision in all of them. (2A Sutherland, supra, at p. 453.) Statutes covering the same subject are construed to be in harmony if reasonably possible. (Id., at pp. 453-454.)
Specifically, the application of Civil Code section 1717 is mandatory because it may not be waived by either party to the contract; any such waiver in a contract is void. (Civil Code, § 1717, subd. (a).) In contrast, the decision to require a bond to cover attorney compensation under Corporations Code section 800 is discretionary, as it is based on the court's determination, drawn from the evidence before it, that one is warranted: subdivision (d) conditions the granting of the motion for a bond on the determination by the court "that the moving party has established a probability in support of any of the grounds upon which the motion is based." (Corp. Code, § 800, subd. (d), italics added; 2 Marsh, Cal. Corporations Law (2d ed. 1988 Supp.) § 14.33, p. 275.) (1b) Hence, the right to a section 800 bond is not absolute; Corporations Code section 800 does not provide for the possibility, as occurred here, that the motion for bond would be denied and defendants would later win at trial. Therefore, Corporations Code section 800 cannot have exclusive jurisdiction over the rights of parties to fees in a shareholder derivative action because the security provision is discretionary and not sufficiently comprehensive. Yet we can harmonize these two statutes: Civil Code section 1717 can fill in the gap left by section 800 because section 1717 is mandatory and, as here, the underlying theory of the case is breach of contract.
(4) A further indication that Corporations Code section 800 and Civil Code section 1717 are not mutually exclusive lies in the fact that section 800 is a procedural statute. (Hogan v. Ingold (1952) 38 Cal.2d 802, 805-806 [243 P.2d 1, 32 A.L.R.2d 834].) As such, it "imposes two principal conditions on the institution and maintenance of stockholder's derivative suits ...," the second of which is the bond procedure. (Ibid.) And, as section 800 is merely procedural, it may be invoked to enable plaintiffs to pursue their right of action; but once that is done, it need not be the sole ground for awarding fees where the theory of the case is breach of contract and where Civil Code section 1717 provides for attorney's fees in such cases.
(1c) Plaintiffs' argument for the exclusivity of Corporations Code section 800 is that it presents a comprehensive scheme for awarding attorney's fees. Plaintiffs reason thus: Corporations Code section 317 provides for attorney compensation when no bond is posted under section 800. However, such cannot be the case. The corporate indemnification under Corporations Code section 317, subdivisions (c) and (d) requires a corporation to indemnify a defendant for costs in defending a shareholder derivative suit in his capacity as an agent of the corporation. Normally, however, the cost of *103 defense is paid out of the section 800 bond. "Any defendant who prevails in the derivative suit, and for whom plaintiff was required to post security, is entitled to recourse to the security for `reasonable expenses, including attorneys' fees' [Corporations Code section 800, subdivision (d).] incurred in the action.... Such expenses may include corporate payments under [Corporations Code section] 317 to indemnify officers and/or directors." (Friedman, Cal. Practice Guide: Corporations (Rutter, 1990) § 6:659, pp. X-XXX-X-XXX, italics added.) Thus, directors' and officers' indemnity is paid out of the posted section 800 bond. (Ibid.) However, if, as plaintiffs would have it, parties must resort to section 317 to recover fees where no bond is posted, then section 800 is not comprehensive, nor can it be the sole basis for recovery of defendants' fees.
(5) (See fn. 3.) Nevertheless, at oral argument, plaintiffs urged when no security is required that defendants may only look to the corporation to recoup their fees through Corporations Code section 317, subdivisions (d) and (g).[3] Section 317, subdivision (d) of the Corporations Code is known as the mandatory indemnity provision (1 Ballantine & Sterling, Cal. Corporation Laws (4th ed. 1990) § 109.01, p. 6-41; See Heyler, Indemnification of Corporate Agents (1975-1976) 23 UCLA L.Rev. 1255, 1261.) Under that subdivision, "To the extent that an agent of a corporation has been successful on the merits in defense of any proceeding ... the agent shall be indemnified against expenses actually and reasonably incurred by the agent in connection therewith." (Italics added.)
(1d) The question remains, however, whether Corporations Code section 317, subdivision (d) applies mandatorily to defendants who could then only recover attorney's fees through corporate indemnity. The Legislative Committee Comment states that the objective of section 317 is to afford officers and directors the freedom to conduct their activities on behalf of the corporation without fear of bearing the financial burden of defending themselves *104 against meritless charges. (See Friedman, supra, at § 6:440, p. 6-94.2.) The mandatory element of subdivision (d) protects corporate agents from an antagonistic board, disinclined to vote to indemnify under the permissive provisions. (Heyler, supra, 23 UCLA L.Rev. at p. 1261.) Subdivision (d) was enacted therefore, for the benefit of parties in the posture of defendants here, who are successful in their defense, and it is mandatorily applied to the corporation should corporate agents seek it. Where section 317 inures to the benefit of defendants, they may elect reimbursement under that section. Defendants, however, did not choose to be indemnified through section 317, subdivisions (d) and (g). There is no authority for, nor is there any logic in the proposition that Corporations Code section 317, subdivisions (d) and (g) are defendants' sole basis for recovery of fees in the absence of a section 800 bond, especially where defendants have elected to recover their fees under Civil Code section 1717.
Certainly, plaintiffs cannot force defendants to seek indemnity from the corporation. (6) Another impact of subdivision (d) of section 317 is to "discourage[] frivolous suits by dissident shareholders, ..." (Friedman, supra, § 6:440, at p. 6-94.2.) A similar rationale underlies the section 800 security: namely to prevent "strike suits." (See Cohen v. Beneficial Industrial Loan Corp. (1948) 337 U.S. 541, 548-549 [93 L.Ed. 1528, 1537-1538, 69 S.Ct. 1221]; 2 Marsh, supra, at p. 270.) It would defeat these statutory aims to allow plaintiffs to avoid financial responsibility for the cost of defense by forcing defendants to seek reimbursement from the corporation, especially where defendants are the majority shareholders. Indeed, the consequences of requiring defendants to recover their attorney's fees through section 317 exclusively are absurd: by everyone's estimation, the corporation is broke and would have to obtain the funds for indemnification from the shareholders. Defendants constitute 53 percent of the shareholders in this corporation, so that defendants will have to pay 53 percent of their own attorney's fees. Further, in a shareholder derivative suit, the security, designed to cover defendants' attorney's fees, is posted by plaintiffs. (Corp. Code, § 800, subd. (c).) Section 800 contemplated that the plaintiffs would be responsible for compensating defendants' attorneys, and any corporate obligations under section 317, should defendants win. (Corp. Code, § 800, subds. (c) and (d).)[4] To force defendants to pay 53 percent of their own fees through indemnity would be anomalous and contrary to the express statutory scheme, and we are unwilling to allow plaintiff to avoid their financial responsibility by foisting it off on the corporation.
(7) A shareholder derivative suit is an action in equity. (Rosenfeld v. Zimmer (1953) 116 Cal. App.2d 719, 722 [254 P.2d 137].) (1e) The equities *105 of this case along with common sense dictate that we not require defendants to seek indemnity from an already penurious corporation, where defendants would have to pay the bulk of their own fees, and where defendants had the foresight to choose an alternative source, i.e., Civil Code section 1717 for recovering their attorney's fees.
To deny defendants attorney's fees on the grounds that Corporations Code section 800 should be the sole governing statute would be manifestly unfair. In the case before us, as earlier noted, we are told that defendants twice moved for the posting of security and twice the motion was denied. Now, after the trial on the merits, there is no bond on which to rely for costs and attorney's fees though defendants, not plaintiffs, were vindicated in this action. Meanwhile, there are three contracts at issue: the purchase agreement, the management agreement and the lease, all of which provide for attorney's fees. Civil Code section 1717 allows for fees based on those contracts, and plaintiffs chose to sue on those contracts. If the trial court were only empowered to grant attorney's fees and costs from a section 800 bond, then defendants would be unable to recover their fees and costs. This would be a harsh result in view of the contracts' provisions for fees and because defendants diligently brought two motions for bonds under Corporations Code section 800. They should not be the ones to suffer because, in hindsight, after all of the evidence was in, the motions should have been granted.
Otherwise, plaintiffs misapply Alcott v. M.E.V. Corp. (1987) 193 Cal. App.3d 797 [238 Cal. Rptr. 520] and Freeman v. Goldberg (1961) 55 Cal.2d 622 [12 Cal. Rptr. 668, 361 P.2d 244]. Unlike the case here, where attorney's fees are based on the subject matter of the lawsuit, the court in Alcott specifically noted that section 800 was the sole statutory basis for the trial court's ruling in that case. (Alcott, supra, at p. 799.) Also, the defendants in Alcott never moved for a bond, and the case never went to trial (193 Cal. App.3d at pp. 798-799.); whereas, in the case here, the defendants twice moved for security and prevailed on the merits at trial.
The issue in Freeman v. Goldberg, supra, 55 Cal.2d 622, was whether attorney's fees may be taxed as costs upon dismissal of an action for failure to post a required bond. (Id., at p. 625.) Under section 800, actions must be dismissed if security is required and plaintiff fails to post it. (Corp. Code, § 800, subd. (d).) The Freeman court stated that the predecessor to Corporations Code section 800 "contains no provision for an award of attorney's fees where, ... security is not furnished and the action is dismissed on that ground. [Because] the liability and remedy are created by statute, there can be no recovery except by recourse to the security as provided by the statute." (Freeman, supra, 55 Cal.2d at p. 626, italics added.) If no bond had *106 been required and had that case then proceeded to trial, attorney's fees could well have been awarded pursuant to another statute on which the theory of the case was based. The trial court's refusal to grant the motion for a bond here is purely discretionary and no bond was available; yet there is an alternative basis for awarding fees outside the statute, and Freeman, supra, 55 Cal.2d 622, thus, has no application here. In sum, it cannot be said that these cases stand for the rule that where security is not required in the first place, prevailing defendants may not recover any attorney's fees, even if authorized by another statute.
Plaintiffs finally argue that the court erred as a matter of law in applying Civil Code section 1717 because that section provides for reciprocity or fee shifting while Corporations Code section 800 specifically does not. This argument is unavailing. Plaintiffs go to great lengths to explain that section 800 provides for a bond for attorney's fees for the corporation and defendants only. (1A Ballantine & Sterling, supra, § 294.01, at pp. XX-XX-XX-XX.) Plaintiffs in a shareholder derivative action may only recover attorney's fees outside the statutory structure, through the invocation of one of two doctrinal theories of recovery: the substantial benefit rule and the common fund doctrine. (Fletcher v. A.J. Industries, Inc., supra, 266 Cal. App.2d 313, 320.) Citing Alcott v. M.E.V. Corp., supra, 193 Cal. App.3d 797, and Covenant Mutual Ins. Co. v. Young (1986) 179 Cal. App.3d 318 [225 Cal. Rptr. 861], plaintiffs argue that it is in the province of the Legislature, not the courts, to create reciprocal rights to attorney's fees, and that we should not apply section 1717 to make reciprocal what section 800 does not.
The court in Covenant Mutual described one-sided attorney's fees provisions in contracts which always favor the party with the greater bargaining power, and through enactment of Civil Code section 1717, the Legislature has evidenced it deems statutorily imposed fee shifting to be necessary in certain circumstances. (Covenant Mutual Ins. Co. v. Young, supra, 179 Cal. App.3d at p. 324.) In comparison, the court noted that "in literally scores of specific areas of the law it has intentionally imposed one-sided fee-shifting as a means of advancing the public interest." (Id., at p. 325, italics in original.) However, the Legislature's failure specifically to create a reciprocal right to fees under Corporations Code section 800 could be due to the availability to plaintiffs of these two doctrinal grounds for recovery of attorney's fees. Therefore, we cannot say that the Legislature chooses not to make the right reciprocal.
In any event, Covenant Mutual is not applicable for our purposes because it has nothing to do with shareholder derivative suits, and because the award statute relied on in that case was Civil Code section 3318, "Breach of Warranty of Authority," referred to as a "`measure of damages' provision *107 not a general attorney fee statute." (179 Cal. App.3d at pp. 321-322.) The court in that case never addressed Corporations Code section 800. (Covenant Mutual Ins. Co. v. Young, supra, 179 Cal. App.3d 318, 323-324.)
In Alcott, after the appellate court refused to grant fees under section 800 on the grounds that no security was posted (Alcott v. M.E.V. Corp., supra, 193 Cal. App.3d at pp. 799-800, citing Freeman v. Goldberg, supra, 55 Cal.2d 622.), defendants argued, had plaintiffs prevailed on their derivative action, that they would have recovered fees under the substantial benefit rule and by extension of Civil Code section 1717, defendants should be accorded a reciprocal right. (Id., at p. 800.) The court rejected this argument outright, stating: "[s]ection 1717 by its terms applies only to contracts. We are cited to no case which has applied reciprocity beyond contracts to fee-shifting statutes or court-imposed public policies." (Ibid.) In Alcott no independent contractual basis for fee recovery was cited. Here, underlying contracts exist which provide an independent, alternative basis for defendants' fee recovery. Defendants are not relying on Corporations Code section 800 for their fees. Civil Code section 1717, subdivision (a) gives the prevailing party "[i]n any action on a contract" the right to attorney's fees if the contract so provided. (Civ. Code, § 1717, subd. (a), italics added.) The subject matter of the suit here is an action for breach of three contracts, all of which contain reciprocal provisions granting attorney's fees to the prevailing party. Defendants should recover their fees. To the degree that Alcott v. M.E.V. Corp., supra, 193 Cal. App.3d 797, might hold to the contrary, we decline to follow its reasoning.
The subject matter of this action is breach of the purchase agreement, lease and management agreement which is, as the trial court observed in its August 28, 1989, notice of ruling, "the underlying basis for virtually all Plaintiffs' causes of action in the complaint." The contractual breach alleged in the first cause of action was incorporated into the remaining causes of action so that breach of contract was an element of each of the several causes of action. The alleged breach of defendants' fiduciary duty was premised on alleged mismanagement and failing to renew or to pay reasonable rent after the lease term. Plaintiffs also sought declarations, among other things, of mismanagement, and that the defendants were not entitled to performance stock according to the purchase agreement. Moreover, the cause of action for accounting required a calculation of rent owed. It is clear that the gravamen of the underlying action was breach of contract. Thus, Civil Code section 1717 governs the rights of the parties to attorney's fees, and the bond provided for in Corporations Code section 800 need not be applied. We have found no authority for denying defendants their fees under Civil Code section 1717, and we hold that section 800 of the Corporations Code does not prescribe the exclusive statutory ground for granting *108 attorney's fees where the shareholder derivative suit was premised on causes of action for breach of contract, which contracts contain attorney's fees provisions, and where requests for security under Corporations Code section 800 had been denied.[5]

III.

The Trial Court Did Not Err in Finding Defendants Prevailed in Litigation on the Contract
(8) Plaintiffs contend that the court erred in its August 28, 1989, notice of ruling in finding that defendants prevailed in the action on the contract; they argue that the finding is contrary to the standards set forth in Corporations Code section 317. This argument assumes that these statutory provisions must apply to this transaction. However, as we have decided above, neither Corporations Code section 800 nor section 317 are exclusive predicates for recovery of attorney's fees. Defendants did not choose to apply for indemnity as they sought fees under the independent source of Civil Code section 1717. The court rightfully decided that the defendants' right to attorney's fees was founded on the contracts at issue, not under section 800 or section 317 of the Corporations Code. Having decided this, therefore, the test of who shall recover attorney's fees under section 317 is irrelevant. The relevant test is that of Civil Code section 1717.

IV.

The Trial Court Did Not Err in Holding Individual Plaintiffs Liable for Attorney's Fees to Prevailing Defendants
(9a) Plaintiffs dispute the trial court's determination that the individual plaintiffs are liable to the individual defendants for attorney's fees because, they say, none of the provisions in the one contract signed by plaintiffs Brusso and Clifford Chandler were sued on in this action. Based on the evidence before us, however, it is our view that the suit and liability for fees here are predicated on breach of three contracts.
First, the purchase agreement, as amended and signed by the corporation and the Clark Group, provides under section 11, "in case suit shall be *109 brought for default under this Agreement, or because of the breach of any other covenant herein contained ..., the prevailing party shall receive all reasonable costs of suit including reasonable attorneys' fees as shall be fixed by the Court." (Italics added.) The individual warranties on the purchase agreement signed by the plaintiffs, individually and not on behalf of the corporation, specifically apply to section 11, the attorney's fees section.
At oral argument, counsel for plaintiffs invoked Sciarrotta v. Teaford Custom Remodeling, Inc. (1980) 110 Cal. App.3d 444, 450 [167 Cal. Rptr. 889], in arguing that the individual warranty subscribed by Chandler, Madden, Weller, Brusso, Blythe, Millinger, and Smith did not extend to the attorney fee provision of the purchase agreement. However, as noted, our inspection of the individual warranty shows that it refers specifically, among others, to section 11 of the purchase agreement. That section is the provision which provides for an award of attorney's fees "[i]n case suit shall be brought for a default under this Agreement...." (Italics added.)
Second, the suit deals with a management agreement, which the parties understood and agreed "constitutes an integral and material part" of the transaction described in the purchase agreement. Section 16 of the purchase agreement states, "The parties hereto agree that any breach of any term or condition of this Agreement shall constitute a material breach of this Agreement." (Italics added.) Thus, the parties contemplated that a breach of the management agreement would be a material breach of the purchase agreement, and also subject to the section 11 attorney's fees provision. The court correctly held the individual plaintiffs, Dominic Brusso and Clifford Chandler individually liable for those attorney's fees incurred by the prevailing party, the defendants, in defense of all actions on the purchase agreement and the management agreement.
Third, the lease also contains its own attorney's fees provision. The only signatories there are the corporation and defendant William E. Clark. However, as we discuss below, the trial court was correct in directing the individual plaintiffs, not the corporation, to pay the defendants' fees.
The remaining plaintiffs did not sign the contracts or the warranties. Nonetheless, they can still be held liable as nonsignatory plaintiffs for the payment of fees to signing defendants. (See Jones v. Drain (1983) 149 Cal. App.3d 484, 488-490 [196 Cal. Rptr. 827]; Manier v. Anaheim Business Center Co. (1984) 161 Cal. App.3d 503, 508 [207 Cal. Rptr. 508].) In Jones, signatory defendants prevailed in a cause of action for breach of contract. The plaintiffs, not signatories to the contract argued that they should not be held liable for defendants' fees on the grounds that they were not parties to the contract and therefore they could not have recovered under the contract *110 had they won. (149 Cal. App.3d at p. 488.) In holding the losing, nonsignatory plaintiffs liable to defendants for attorney's fees under the contract, the court noted that had plaintiff prevailed, he would have been entitled to attorney's fees on the contract. (Id., at p. 489.) The court then declared, "courts have consistently held that the award of Civil Code section 1717 contractual attorney's fees is to be governed by equitable principles. [Citations.] We believe that it is extraordinarily inequitable to deny a party who successfully defends an action on a contract, which claims attorney's fees, the right to recover its attorney's fees and costs simply because the party initiating the case has filed a frivolous lawsuit.... [W]e find that a prevailing defendant sued for breach of contract containing an attorney's fees provision and having had to defend the contract cause of action is entitled to recover its own attorneys's fees and costs therefor, even though the trial court finds no contract existed." (Id., at pp. 489-490.) Defendants here were sued on contracts containing attorney's fees provisions and were forced to defend the contract causes of action. It would be "extraordinarily inequitable" to deny them attorney's fees because plaintiffs who are not signatories chose to sue on the contracts in an action on behalf of the corporation when the corporation would not bring suit itself. (Toboni v. Pennington Millinery Co. (1959) 172 Cal. App.2d 47, 50 [341 P.2d 845].)[6] After all, although the nonsignatory plaintiffs here did not claim a right to fees on the contract, they would have paid for defendants' attorney's fees under Corporations Code section 800 if they had been required to post a bond. Plaintiffs took a chance that the bond would not be required and cannot now avoid all financial responsibility for the suit. To hold otherwise would be contrary to the asserted purpose of the section 800 bond, namely to prevent strike suits.
Leach v. Home Savings & Loan Assn. (1986) 185 Cal. App.3d 1295 [230 Cal. Rptr. 553], disapproved of the holding in Jones and offers an alternative basis for charging nonsignatory plaintiffs for defendants' fees. There, prevailing defendants, signatories on two promissory notes, sought attorney's fees from a nonsignatory plaintiff. The court refused to direct the plaintiff to pay the fees, not because she was not a party to the contract, but because under the California rule, "one may only recover attorney's fees pursuant to section 1717 if one `would have been liable' for such fees had the opposing party prevailed." (Id., at pp. 1305, 1306-1307, citing Reynolds Metals Co. v. *111 Alperson (1979) 25 Cal.3d 124, 128, 129 [158 Cal. Rptr. 1, 599 P.2d 83].) In Leach, plaintiff did not fit into that rule as she would not have been entitled to attorney's fees by operation of the contract had she prevailed. (185 Cal. App.3d at pp. 1305-1306.) (10) (See fn. 7.), (9b) Here, however, the nonsignatory plaintiffs would have had a right to receive fees under the substantial benefit doctrine had they prevailed. (1A Ballantine & Sterling, supra, §§ 294.01-294.03, at pp. XX-XX-XX-XX; Fletcher v. A.J. Industries, Inc., supra, 266 Cal. App.2d 313, 320.[7] That is, had defendants lost, they would have been liable to plaintiffs for damages and fees under the contract, thereby creating a benefit to the corporation in the form of a common fund from which all plaintiffs could have recovered their fees. Therefore, under the theory of Reynolds, supra, 25 Cal.3d 124, and Leach, supra, 185 Cal. App.3d 1295, the trial court correctly awarded fees to the signatory defendants from the nonsignatory plaintiffs under the mutuality theory of Civil Code section 1717, doing so on the grounds that, had plaintiffs prevailed, they would have been entitled to attorney's fees pursuant to the substantial benefit doctrine. (Fletcher, supra, 266 Cal. App.2d 313, 320; Leach, supra, 185 Cal. App.3d 1295, 1305-1307; 1A Ballantine & Sterling, supra, at pp. XX-XX-XX-XX.)

V.

The Trial Court Did Not Err in Denying Costs and Fees to Plaintiffs
(11) Plaintiffs finally urge that they are entitled to attorney's fees under section 317 of the Corporations Code and the substantial benefit rule, and the court erred in failing to award them such fees. However, there is no evidence in the record before us that plaintiffs ever sought attorney's fees from the trial court under these provisions. Plaintiffs' motion for fees was on behalf of plaintiff Kinsey, is dated May 11, 1989, and cites Civil Code section 1717 as its authority. Indeed, nowhere in the record did plaintiffs seek fees under the substantial benefit rule until plaintiffs filed their motion to reconsider the court's award of fees, dated August 31, 1989, and their supplemental points and authorities on the matter dated September 22, 1989. This was long after the conclusion of trial and of the motions on attorney's fees. The court's ruling on this motion is not in the record. Thus, there is insufficient information in the record before us to consider this contention.
In any event, the record reveals that only cross-defendant Kinsey sought attorney's fees before the trial court's order on fees, and that was for defense *112 of the cross-complaint. Kinsey based his relief on Civil Code section 1717 and a consulting agreement, which included an attorney's fees clause. However, the cross-complaint did not include a cause of action on that contract and so we will not award Kinsey the fees he seeks. (Sciarrotta v. Teaford Custom Remodeling, Inc., supra, 110 Cal. App.3d 444, 450.)

DISPOSITION
The order for attorney's fees is affirmed. We also direct the court to calculate and award reasonable attorney's fees incurred by defendants on this appeal, the same to be paid by plaintiffs individually.
Dabney, Acting P.J., and Timlin, J., concurred.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for partial publication. Section I of the Discussion, captioned "Appealability" is not certified for publication.
[*]   Retired Associate Justice of the Court of Appeal sitting under assignment by the Chairperson of the Judicial Council.
[*]   See footnote, ante, page 92.
[2]  Corporation Code section 800, subdivisions (c) and (d) read as follows: "(c) ... at any time within 30 days after service of summons upon the corporation or upon any defendant ... the defendant may move the court for an order, upon ... hearing, requiring the plaintiff to furnish a bond as hereinafter provided. The motion shall be based upon one or both of the following grounds:

"(1) That there is no reasonable possibility that the prosecution of the cause of action alleged in the complaint against the moving party will benefit the corporation or its shareholders.
".... .... .... .... .... . .
"(d) At the hearing upon any motion pursuant to subdivision (c), the court shall consider such evidence, ... as may be material ... (2) to a determination of the probable reasonable expenses, including attorneys' fees, of the corporation and the moving party which will be incurred in the defense of the action. If the court determines, after hearing the evidence ..., that the moving party has established a probability in support of any of the grounds upon which the motion is based, the court shall fix the amount of the bond, ..."
[3]  Plaintiffs argued that Corporations Code section 317, subdivision (g) mandates indemnification under the corporation's bylaws. However, subdivision (g) provides that "The indemnification provided by this section for acts, omissions, ... but not involving breach of duty to the corporation and its shareholders shall not be deemed exclusive of any other rights to which those seeking indemnification may be entitled under any bylaw, agreement, ... or otherwise, to the extent the additional rights to indemnification are authorized in the articles of the corporation." In contrast, the predecessor to section 317, section 830, subdivision (e), provided that it was the exclusive authority for awarding attorney's fees to an officer or director of the corporation. (Fletcher v. A.J. Industries, Inc. (1968) 266 Cal. App.2d 313, 326-327 [72 Cal. Rptr. 146].) That phrase never became part of section 317, which explicitly states that it is not the exclusive remedy.

The final sentence of subdivision (g) states that "Nothing contained in this section shall affect any right to indemnification to which persons other than the directors and officers may be entitled by contract or otherwise." We do not construe this provision as limiting officers and directors to seeking their attorney's fees from the corporation only.
[4]  Subdivision (d) of Corporations Code section 800 provides that the bond will cover "expenses for which the corporation may become liable pursuant to section 317."
[5]  At oral argument, plaintiffs expressed concern that our holding here would render section 800 moot. This reflects plaintiffs' misunderstanding of our holding. Section 800 provides the shareholder's derivative right of action and sets out the procedural requirements for bringing such a suit. Also, our holding is specifically applicable where the security was not required. Clearly, if the security had been posted, defendants could have obtained their fees out of that fund.
[6]  There are quite a few cases in which one of the parties in the suit on the contract was not a signatory. (See, e.g., Saucedo v. Mercury Sav. & Loan Assn. (1980) 111 Cal. App.3d 309 [168 Cal. Rptr. 552]; Wilhite v. Callihan (1982) 135 Cal. App.3d 295 [185 Cal. Rptr. 215]; Babcock v. Omansky (1973) 31 Cal. App.3d 625 [107 Cal. Rptr. 512]; Canal-Randolph Anaheim, Inc. v. Wilkoski (1978) 78 Cal. App.3d 477 [144 Cal. Rptr. 474].) However, unlike the case before us, in those cases the prevailing party, either plaintiff or defendant, seeking to recover attorney's fees under the contract, was the party that did not sign the contract.
[7]  The substantial benefit doctrine "permits the shareholders to recover attorneys' fees in a successful derivative suit ... as long as [the suit] provided a substantial benefit to the corporation." (1A Ballantine & Sterling, supra, § 294.03, at p. 14-31; Fletcher, supra, 266 Cal. App.3d 313, 320.)
