
46 Cal.App.3d 614 (1975)
120 Cal. Rptr. 253
CHARLES H. GOLDSTEIN et al., Plaintiffs and Respondents,
v.
ALAN B. LEES et al., Defendants and Appellants.
Docket No. 43869.
Court of Appeals of California, Second District, Division Five.
March 28, 1975.
*616 COUNSEL
Schurmer, Drane, Bullis & Reese and Earl D. Reese for Defendants and Appellants.
Nelson, Kirshman, Goldstein, Gentile & Rexon and Jeffrey C. Freedman for Plaintiffs and Respondents.
*617 OPINION
STEPHENS, Acting P.J.
On January 31, 1972, the law firm of Charles H. Goldstein, Joseph F. Gentile, and Norman H. Kirshman filed its amended complaint claiming money due for the reasonable value of legal services rendered by Norman H. Kirshman. Defendants Alan B. Lees and Florenza Lees contended at trial that the monies prayed for in the complaint exceeded the amount specified in an oral agreement between Alan Lees and Norman Kirshman. Plaintiffs contended that there was no such agreement, and the trial judge agreed. The defendants have appealed.
The basic question presented in this case is whether or not a former counsel to a corporation can properly render legal services on behalf of a minority shareholder and director in a proxy fight designed to gain control of the same corporation under circumstances where the former counsel holds corporate confidences and secrets which are relevant to the proxy fight. We hold that such representation is improper and that a contract to provide such services is void for reasons of public policy.

Facts
Norman Kirshman served as executive vice president, secretary, and general counsel to Diodes, Inc. from April 1967 to October 1969. Before assuming the position of general counsel, he had been retained by Diodes as outside counsel, beginning February 1965. In his position as an officer and as general counsel to Diodes, Kirshman became privy to its innermost secrets. In fact, Kirshman testified that he "knew the operations of the corporation intimately.... [A]ll of the subsidiaries had been acquired either as a result of my negotiations[1] or as a result of my participation that I had as a member of the board of directors.... I think I knew the company more intimately than anybody other than Mr. Lloyd ... the chief executive officer."
Early in 1971, Kirshman and Alan Lees (a director of Diodes, who owned more than 107,000 shares of its stock) discussed the possibility of a proxy solicitation to gain control of the corporation. After a series of preliminary discussions, the decision to initiate the proxy battle was made, and Lees agreed to assume the cost of soliciting proxies. Initially, Lees, at Kirshman's suggestion, retained the legal services of Goldstein *618 and Moffitt. After two months, Lees discharged Goldstein and Moffitt and hired Kirshman as counsel for the proxy effort. Kirshman testified that he felt he could perform the work "very effectively because of my insight to the facts, whereas some other attorney who was a total stranger to the Diodes scene would not have, and I agreed to accept full responsibility for the Diodes contest."
Thus there is no question that Kirshman's "insight to the facts" of Diodes was a critical component in the retention of his services as counsel. Indeed, as Kirshman explained, the decision to initiate the proxy struggle was preceded by "many questions by Dr. Lees to me about the intricacies and inside information that I had because I had been very close to Mr. Lloyd as his No. 2 man...."

Discussion
(1) It is settled in California that an attorney may not recover for services rendered if those services are rendered in contradiction to the requirements of professional responsibility. As the California Supreme Court explained in Clark v. Millsap, 197 Cal. 765, 785 [242 P. 918] (quoting 6 C.J. 722, 723), "Fraud or unfairness on the part of the attorney will prevent him from recovering for services rendered; as will ... acts of impropriety inconsistent with the character of the profession, and incompatible with the faithful discharge of its duties." (Italics added.) (See also Priester v. Citizens Nat. etc. Bank, 131 Cal. App.2d 314, 322 [280 P.2d 835]; Denton v. Smith, 101 Cal. App.2d 841, 845 [226 P.2d 723].) (2) Contracts to render such services even if not tainted with actual fraud have been held to be "clearly against public policy and void."[2] (Anderson v. Eaton, 211 Cal. 113, 116 [293 P. 788].) Thus the facts and law applicable to this case require us to decide a question of first impression in California  whether a former counsel to a corporation can properly represent a minority shareholder and director of the same corporation in a proxy contest in circumstances where counsel holds corporate secrets that are material to the proxy fight.
(3a) At the time of the performance of the services for which compensation is demanded here, rule 5 of the Rules of Professional Conduct provided that: "A member of the State Bar shall not accept *619 employment adverse to a client or former client, ... relating to a matter in reference to which he has obtained confidential information by reason of or in the course of his employment by such client or former client."[3] (See Bus. & Prof. Code, § 6076.) (4) The primary purpose of this rule is to protect the confidential relationship which exists between attorney and client. (Jacuzzi v. Jacuzzi Bros., Inc., 218 Cal. App.2d 24, 28 [32 Cal. Rptr. 188].) Thus, nothing in the rule prohibits an attorney from accepting employment adverse to a former client if the matter has no relationship to confidential information acquired by reason of or in the course of his employment by the former client. Similarly, nothing in the rule prohibits an attorney from accepting employment relating to a matter in which he has obtained confidential information provided that the new employment is not adverse to the interests of the former client. Plaintiffs contend that Kirshner's representation was not adverse to the interests of the corporation.
(3b) In one sense, plaintiffs are correct. There is no basis in the record which would permit an appellate court to conclude that the proxy fight itself was adverse to the interests of the corporation. This conclusion follows even though Kirshman and Lees failed in their attempt to gain control of the corporation. We cannot say that this exercise in corporate democracy was inimical to the interests of the corporation. Certainly if the proxy fight itself were in fact adverse to the interests of the corporation, a violation of rule 5 would be apparent. Although the conclusion that the proxy fight may have been consistent with the interests of the corporation is necessary to preserve the plaintiffs' judgment, it is not sufficient. The question is whether or not the employment of Kirshman was adverse to the interests of the former client. Clearly, it was.
Business and Professions Code section 6068, subdivision (e), states: "It is the duty of an attorney: ... [t]o maintain inviolate the confidence, and at every peril to himself to preserve the secrets, of his client." In this instance, Kirshman accepted employment which surely at best must have tempted him to reveal or to improperly monopolize the confidences and secrets of his former client. As the Supreme Court recognized in *620 Anderson v. Eaton, supra (at p. 117), "Conscience and good morals dictate that an attorney should not so conduct himself as to be open to the temptation of violating his obligation of fidelity and confidence." Clearly, the acceptance of employment which threatens the revelation or improper monopolization of a former client's confidences is adverse to the interests of the former client. To be sure, rule 5 implies that an attorney may accept employment on a matter in reference to which he has before obtained confidential information, but nothing in rule 5 sanctions the acceptance of such employment when the representation of the interests of the new client inherently tempts the attorney to reveal or improperly monopolize the confidences of the old. Such a reading of rule 5 would conflict with the policies underlying section 6068, subdivision (e), of the Business and Professions Code; it would needlessly permit attorneys to create the appearance of impropriety. Nor would such an interpretation offer assistance to the new client. Clients are entitled to vigorous and determined representation by counsel. It is difficult to believe that a counsel who scrupulously attempts to avoid the revelation of former client confidences  i.e., who makes every effort to steer clear of the danger zone  can offer the kind of undivided loyalty that a client has every right to expect and that our legal system demands. Rule 5 operates to preclude any impediment to the fulfillment of an attorney's professional obligation to his client by proscribing any conflict of interest in his representation of past and present clients.[4] "`It is better to remain on safe and secure professional ground, to the end that the ancient and honored profession of the law and its representatives may not be brought into disrepute. Courts have consistently held the members of the profession to the strictest account in matters affecting the relation of attorney and client.'" (Tomblin v. Hill, 206 Cal. 689, 694 [275 P. 941], quoting Addison v. Cope, 210 Mo. App. 569 [243 S.W. 212, 215].)
It could be argued that as a shareholder and as a director, Lees was entitled to be apprised of corporate confidences and secrets. Since Lees' *621 status as a shareholder and his status as a director give rise to different issues, we treat the questions separately.
Clearly, the duty stated in section 6068, subdivision (e) applies in the corporate context. (5) (See fn. 5.) As the California Supreme Court stated in discussing the narrower[5] but related question of the attorney-client privilege, "Certainly the public policy behind the attorney-client privilege requires that an artificial person be given equal opportunity with a natural person to communicate with its attorney, within the professional relationship, without fear that its communication will be made public. As one writer has said, `The more deeply one is convinced of the social necessity of permitting corporations to consult frankly and privately with their legal advisers, the more willing one should be to accord them a flexible and generous protection.'" (D.I. Chadbourne, Inc. v. Superior Court, 60 Cal.2d 723, 736 [36 Cal. Rptr. 468, 388 P.2d 700], quoting Simon, The Attorney-Client Privilege as Applied to Corporations (1956) 65 Yale L.J. 953, 990.)
(6) Moreover, it is apparent that although shareholders have some rights to corporate information not available to the general public, shareholder status does not in and of itself entitle an individual to unfettered access to corporate confidences and secrets. For example, Corporations Code section 3003[6] confines the shareholder's right to inspect corporate records to three categories of documents: (1) the share register or duplicate share register; (2) the books of account; and (3) the minutes of proceedings of the shareholders and the board of directors, and of executive committees of the directors. Thus, by statute, shareholders have less right to acquire corporate information than do directors.[7]*622 This proposition is also supported by the interpretations governing the scope of the attorney-client privilege. (7) It is generally conceded that a communication coming from a mere stockholder would not be privileged. (See D.I. Chadbourne, Inc. v. Superior Court, supra; Annot., 98 A.L.R.2d 241, 245-247.) The logical counterpart of this concession would appear to be that the privilege may be invoked "against all those whose communications are not covered by the scope of the privilege  among others, the stockholders of the corporation." (Comment, The Attorney-Client Privilege in Shareholders' Suits, 69 Colum.L.Rev. 309, 318, fn. 39.) This, of course, does not mean that such a privilege is absolute. It may, for example, give way in shareholders' derivative suits on a proper showing (Garner v. Wolfinbarger (5th Cir.1970) 430 F.2d 1093), but the fact that the availability of the privilege may be denied by a judicial officer on a proper showing does not mean that a former attorney may divulge corporate secrets to a shareholder in the absence of a corporate waiver, or in the absence of judicial compulsion.
On the other hand, Lees' position as a director of the corporation would ordinarily entitle him to the receipt of confidential information. Thus it can be argued that Kirshman's employment did not threaten the revelation of corporate confidences to anyone who would not otherwise be entitled to receive them. This superficially acceptable argument cannot withstand analysis.
(8) Clearly, if Kirshman were counsel to the corporation, he could not, consistently with his position as general counsel, act as proxy for one contending group of shareholders. As the Committee on Professional Ethics and Grievances of the American Bar Association stated in Opinion 86: "In acting as the corporation's legal adviser he must refrain from taking part in any controversies or factional differences which may exist among shareholders as to its control. When his opinion is sought by those entitled to it, or when it becomes his duty to voice it, he must be in a position to give it without bias or prejudice and to have it recognized as being so given. Unless he is in that position his usefulness to his client is impaired." This duty to act without bias or prejudice does not dissolve merely because the attorney has been discharged. Any contrary ruling would conflict with California's commitment to the principle that "the client's power to discharge an attorney, with or without cause, is *623 absolute." (Code Civ. Proc., § 284; Fracasse v. Brent, 6 Cal.3d 784, 790 [100 Cal. Rptr. 385, 494 P.2d 9].)
The board of directors, not corporate counsel, has the right to control the affairs of the corporation. (Corp. Code, § 800.) The board of directors thus has the power to retain and discharge corporate counsel. It would serve no useful purpose to burden the exercise of that power with the fear that discharged[8] counsel could make his services available to the highest bidding minority shareholder.[9] Thus, even though a director has a right to receive confidential information, he has no exclusive right to receive such information from former counsel. To the extent that Lees had a claim on Kirshman's knowledge by virtue of his status as director, so did all of the other directors of the corporation.
Thus the argument that Lees had a right to the confidences of the corporation proves too much. It proves that Kirshman had a duty to serve both Lees and the adversaries in the proxy contest. Conflicts of interest such as these cannot be tolerated.
Finally, we note that there is no force to the objection that the result announced here will work a windfall for defendants. (9) (See fn. 10.) This decision is not rendered for the sake of defendants.[10] Indeed, it is *624 enough to say that "[c]ourts do not sit to give effect to ... illegal contracts.[11] The law is not to be subsidized to overthrow itself...." (Valentine v. Stewart, 15 Cal. 387, 405.)
The judgment is reversed.
Ashby, J., and Hastings, J., concurred.
Respondents' petition for a hearing by the Supreme Court was denied June 4, 1975. Mosk, J., was of the opinion that the petition should be granted.
NOTES
[1]  The negotiations were conducted by Kirshman in his capacity as general counsel and in his capacity as executive vice president.
[2]  Alternatively, it could be said that plaintiffs come to the court with unclean hands. The unclean hands doctrine is not confined to equitable actions, but is also available in legal actions. (Fibreboard Paper Products Corp. v. East Bay Union of Machinists. 227 Cal. App.2d 675, 728 [39 Cal. Rptr. 64]; 3 Witkin, Cal. Procedure (2d ed.) Pleading, § 948. p. 2528.)
[3]  The Rules of Professional Conduct have been amended, effective January 1, 1975. Rule 4-101 provides: "A member of the State Bar shall not accept employment adverse to a client or former client, without the informed and written consent of the client or former client, relating to a matter in reference to which he has obtained confidential information by reason of or in the course of his employment by such client or former client."
[4]  Jacuzzi v. Jacuzzi Bros., Inc., supra, 218 Cal. App.2d 24 does not require a different result. In Jacuzzi, the court held that a former attorney for Jacuzzi Bros., Inc. could represent shareholders who sought to restore property and assets to the corporation by means of a derivative action brought on behalf of Jacuzzi Bros., Inc. without violating rule 5. The court stated that the attorney in the derivative action acted "for the benefit of the corporation he previously represented," and concluded that "it is apparent he is not representing an interest adverse to the corporation and the prohibition of rule 5, Rules of Professional Conduct can have no application." (Id. at p. 29.) Jacuzzi is readily distinguishable because the attorney had not obtained any confidential information relating to the subject of the action while acting as attorney for the corporation. (Id. at pp. 27-28.)
[5]  "The attorney-client privilege is more limited than the ethical obligation of a lawyer to guard the confidences and secrets of his client." (American Bar Assn., Code of Professional Responsibility EC4-4.)
[6]  Mooney v. Bartenders Union Local No. 284, 48 Cal.2d 841, 843 [313 P.2d 857] contains the statement that "It is provided by statute that all corporate records in this state shall be open to inspection upon the written demand of any shareholder...." (Italics added.) We do not take this to mean that a shareholder has a right to inspect corporate documents of every kind. Such a reading would contradict the language of section 3003 (set forth supra). Rather, we take the sentence to mean that the categories of documents described in section 3003 comprise the formal records of the corporation and that the shareholder (assuming the other requisites of the statute are met) is entitled to inspect all of the formal records of the corporation.
[7]  Corporations Code, section 3004: "Director's right to inspect books, documents and properties of corporation. Every director shall have the absolute right at any reasonable time to inspect all books, records, documents of every kind, and the physical properties of the corporation, domestic or foreign, of which he is a director, and also of its subsidiary corporations, domestic or foreign. Such inspection by a director may be made in person or by agent or attorney, and the right of inspection includes the right to make extracts. In the case of foreign corporations this right extends only to such books, records, documents, and properties of such corporations as are kept or located in this State."
[8]  We do not intend to suggest that the operation of this rule would vary if the attorney resigns before discharge or resigns because of a disagreement over company policy.
[9]  This factor distinguishes Croce v. Superior Court, 21 Cal. App.2d 18 [68 P.2d 369], a case which held that an attorney who had represented several clients associated with a business enterprise in litigation could later represent one of those former clients in subsequent litigation against his associates in an action involving related subject matter. There is yet another distinction. In Croce, there is nothing to suggest that the attorney had knowledge not shared by the other parties. Here, Kirshman had unique knowledge about the affairs of the corporation. Even if Croce were applicable, we would have difficulty following it. As one court has pointed out, "The rule of Croce has not been followed in any other state, and several more recent cases suggest that its rule may no longer be followed in California." (E.F. Hutton & Company v. Brown, (S.D. Tex. 1969) 305 F. Supp. 371, 393, citing Big Bear Mun. Water Dist. v. Superior Court, 269 Cal. App.2d 919 [75 Cal. Rptr. 580] Earl Scheib, Inc. v. Superior Court, 253 Cal. App.2d 703 [61 Cal. Rptr. 386].)
[10]  Plaintiffs contend that defendants have no standing to raise the issue. They suggest that because Diodes failed to bring an action to remove Kirshman as Lees' attorney, the issue has been waived. There is no suggestion that Diodes, by failing to bring a lawsuit, impliedly consented to Kirshman's behavior; nor would such a suggestion have any merit. Diodes may have failed to bring a lawsuit out of lethargy, lack of finances, political and tactical considerations, etc. In the absence of consent by Diodes, the contract between Kirshman and Lees was illegal. If a contract is voidable for public policy reasons, the court can and should raise the question on its own motion. As Witkin explains (at 3 Cal. Procedure (2d ed.) Pleading, § 918, at pp. 2503-2504, "Generally speaking, an illegal contract is void, and since public policy is involved in the attempted contravention of the law, the parties cannot waive the objection. Hence, with or without pleading, the trial court of its own motion should deny enforcement of an illegal contract by dismissing the action, or the appellate court should reverse a judgment enforcing the contract with directions to dismiss."

The cases cited by plaintiff are either entirely not in point, or involve a situation where the clients consented to the attorney's activity. In such a situation, the contract is not illegal in the first place. (See, e.g., Grauberger v. Light, 127 Cal. App. 576 [16 P.2d 188].)
[11]  Technically, of course, this action is not brought upon the contract, but is brought for services rendered pursuant to the contract. Needless to say, this distinction does not call for a different result.
