
390 N.E.2d 1052 (1979)
Charles MOORE and Lt. Smitherman, Appellants (Respondents below),
v.
Harold SMITH and James Hoskins, Appellees (Petitioners below).
No. 2-978-A-316.
Court of Appeals of Indiana, Fourth District.
June 19, 1979.
*1053 Theo. L. Sendak, Atty. Gen., David L. Steiner, Deputy Atty. Gen., Indianapolis, for appellants.
Harold Smith and James Hoskins, pro se.
YOUNG, Judge.
Harold Smith and James Hoskins filed a Petition for Writ of Habeas Corpus and Writ of Mandate. The substance of the complaint alleged that officials of the Indiana Reformatory at Pendleton were not complying with the policy of the Department of Corrections regarding lay advocates. No question was raised at the trial court or argued here that the commitment of either Smith or Hoskins was illegal.
Hoskins, an inmate of the Indiana Reformatory serving a life sentence for first degree murder, was housed in a seclusion unit at the time of and prior to the hearing in the trial court. Smith, a fellow inmate, was not so excluded from the remainder of the prison population. Smith had represented Hoskins at a transfer hearing in December, 1977. At a different previous hearing Hoskins had been assisted by another inmate. Hoskins wanted Smith to assist him regarding post-conviction proceedings and institutional rule infraction hearings. Hoskins complained that he was not allowed to have Smith represent him but was referred to the writ room for legal assistance.
After a hearing before the Madison County Superior Court, judgment was entered for the petitioners as follows:
The Court now overrules Defendant's Motion to Dismiss.
The Court now finds that the Petitioner, Harold Smith has a right to represent the Petitioner, James Hoskins as a Lay Advocate, so long as the said James Hoskins desires his services. The Court further finds that the said Harold Smith should not be punished or restricted in any way as an ordinary prisoner because of the fact that he is performing such services.
The Attorney General, representing the prison officials, appealed presenting the following allegations of error:
1. Whether the trial court lacked subject matter jurisdiction of the purported habeas corpus action below.
2. Whether the trial court erred in entering Judgment against respondents in that the trial court lacked jurisdiction as to them.
3. Whether the Judgment of the Court was contrary to the evidence, excessive and contrary to law, even assuming (for purposes of argument only) that the trial court had jurisdiction of the cause below.
We agree with appellants that the habeas corpus action below was not proper since the petitioners did not challenge their commitment in any way. One is entitled to a writ of habeas corpus only if he is entitled to immediate release from unlawful incarceration. Pierson v. Phend, (1978) Ind., 379 N.E.2d 442; Dunn v. Jenkins, (1978) Ind., 377 N.E.2d 868; Hawkins v. Jenkins, (1978) Ind., 374 N.E.2d 496. Petitioner does not assert that he is entitled to immediate release. Therefore habeas corpus will not lie. However, the petitioners in substance, sought a mandate. We will review the matter in that light and proceed to consider the merits. Jennings v. State, (1979) Ind., 389 N.E.2d 283. It does not appear that the prison officials were misled by the caption of the petition. The hearing focused not upon issues which would lead to petitioners' release, but instead focused upon the lay advocate issue.
The prison officials next submit that the mandate action is procedurally improper. First, no summons and complaint had been issued and served on the defendants. Second, since it was captioned as a writ of habeas corpus, the proper respondent had to *1054 be the individual charged with custody of the inmates at the Indiana Reformatory, i.e. the Superintendent. Neither of these arguments is persuasive.
Though inartfully drawn, the petition asks the trial court to mandate Assistant Superintendent Moore and Administrative Assistant Smitherman to permit Hoskins the lay advocate of his choice. The petition here satisfies the requirements of a complaint. Since the complaint on its face expressly did not challenge the commitment orders or the legality of the restraint of the prisoners, summons should have been issued rather than a Writ of Habeas Corpus. However, this defect below was not raised by the Attorney General who made a verified return to the Writ of Habeas Corpus. If they wished to complain about lack of process or service of process, Ind.Rules of Procedure, Trial Rule 12(B) was the proper mechanism. This error is waived though by virtue of Trial Rule 12(G) and (H).[1]
We have already held that the writ of habeas corpus was not the remedy actually sought here. Therefore, appellants' argument that they were improper respondents because only the superintendent could respond in an action for a writ of habeas corpus, must also fail. Further, if there was a duty to compel performance, the respondents-appellants were proper parties. IC 1971, XX-X-XX-X (Burns 1973).
Finally, appellants argue that the judgment of the trial court is contrary to law. We agree.
Mandate is an extraordinary remedy expressly provided for by statute and may be prosecuted against a public officer to compel the performance of any act which the law specifically enjoins, or any duty resulting from any office, trust or station. IC XX-X-XX-X. However, it will not lie unless the duty to act is absolute. State ex rel. Cassel v. Johnston, (1933) 204 Ind. 563, 185 N.E. 278. The furnishing of a lay advocate in this case has not been shown to be a duty that is absolute. In Wolff v. McDonnell, (1974) 418 U.S. 539, 94 S.Ct. 2963, 41 L.Ed.2d 935, Mr. Justice White, writing for the majority, discussed the prisoners' rights in this area.
Lawful imprisonment necessarily makes unavailable many rights and privileges of the ordinary citizen, a `retraction justified by the considerations underlying our penal system.' Price v. Johnston, 334 U.S. 266, 285, 68 S.Ct. 1049, 1060, 92 L.Ed. 1356 (1948). But though his rights may be diminished by the needs and exigencies of the institutional environment, a prisoner is not wholly stripped of constitutional protections when he is imprisoned for crime. There is no iron curtain drawn between the Constitution and the prisons of this country. Prisoners have been held to enjoy substantial religious freedom under the First and Fourteenth Amendments. Cruz v. Beto, 405 U.S. 319, 92 S.Ct. 1079, 31 L.Ed.2d 263 (1972); Cooper v. Pate, 378 U.S. 546, 84 S.Ct. 1733, 12 L.Ed.2d 1030 (1964). They retain right of access to the courts. Younger v. Gilmore, 404 U.S. 15, 92 S.Ct. 250, 30 L.Ed.2d 142 (1971), aff'g Gilmore v. Lynch, 319 F. Supp. 105 (ND Cal. 1970); Johnson v. Avery, 393 U.S. 483, 89 S.Ct. 747, 21 L.Ed.2d 718 (1969); Ex parte Hull, 312 U.S. 546, 61 S.Ct. 640, 85 L.Ed. 1034 (1941). Prisoners are protected under the Equal Protection Clause of the Fourteenth Amendment from invidious discrimination based on race. Lee v. Washington, 390 U.S. 333, 88 S.Ct. 994, 19 L.Ed.2d 1212 (1968). Prisoners may also claim the protections of the Due Process Clause. They may not be deprived of life, liberty, or property without due process of law. Haines v. Kerner, 404 U.S. 519, 92 S.Ct. 594, 30 L.Ed.2d 652 (1972); Wilwording v. Swenson, 404 U.S. 249, 92 S.Ct. 407, 30 L.Ed.2d 418 (1971); Screws v. United States, 325 U.S. 91, 65 S.Ct. 1031, 89 L.Ed. 1495 (1945).
Of course, as we have indicated, the fact that prisoners retain rights under the Due Process Clause in no way implies *1055 that these rights are not subject to restrictions imposed by the nature of the regime to which they have been lawfully committed. Cf. U.S. Civil Service Commission v. National Ass'n of Letter Carriers, 413 U.S. 548, 93 S.Ct. 2880, 37 L.Ed.2d 796 (1973); Broadrick v. Oklahoma, 413 U.S. 601, 93 S.Ct. 2908, 37 L.Ed.2d 830 (1973); Parker v. Levy, 417 U.S. 733, 94 S.Ct. 2547, 41 L.Ed.2d 439 (1974). Prison disciplinary proceedings are not part of a criminal prosecution, and the full panoply of rights due a defendant in such proceedings does not apply. Cf. Morrissey v. Brewer, 408 U.S. [471], at 488, 92 S.Ct. [2593], at 2603 [33 L.Ed.2d 484]. In sum, there must be mutual accommodation between institutional needs and objectives and the provisions of the Constitution that are of general application.
418 U.S. at 555-56, 94 S.Ct. at 2974-75.
Here, the petitioners-appellees do not find fault with anything in the process except the right to counsel, or more specifically to the aid of a fellow inmate. The Supreme Court held with respect to this that:
The insertion of counsel into the disciplinary process would inevitably give the proceedings a more adversary cast and tend to reduce their utility as a means to further correctional goals. There would also be delay and very practical problems in providing counsel in sufficient numbers at the time and place where hearings are to be held. At this stage of the development of these procedures we are not prepared to hold that inmates have a right to either retained or appointed counsel in disciplinary proceedings.
Where an illiterate inmate is involved, however, or where the complexity of the issue makes it unlikely that the inmate will be able to collect and present the evidence necessary for an adequate comprehension of the case, he should be free to seek the aid of a fellow inmate, or if that is forbidden, to have adequate substitute aid in the form of help from the staff or from a sufficiently competent inmate designated by the staff. We need not pursue the matter further here, however, for there is no claim that the named respondent, McDonnell, is within the class of inmates entitled to advice or help from others in the course of a prison disciplinary hearing.
418 U.S. at 570, 94 S.Ct. at 2981. This right exists where there is "serious misconduct"[2] which results in a loss of an interest protected by the Fourteenth Amendment, Wolff, 418 U.S. at 557, 94 S.Ct. 2963; or a "grievous loss," Dunn, 377 N.E.2d at 876.
In this case the petitioners did not adequately allege or show that the right to assistance and therefore the duty necessary to issue a writ of mandate did not exist. The "rule or regulation"[3] states that an *1056 inmate confined in segregation should be entitled to the assistance of a lay advocate in preparing and presenting his case. Petitioners proved that Hoskins was in segregation. But they failed to demonstrate any need, hearing or particular matter for which there is a right to assistance from a lay advocate. A general reference is made to some institutional violations which need to be "straightened out," but then petitioner develops the fact that no charges have been made against Hoskins in the last six months and none are presently pending.
Petitioners have shown no circumstances which would give rise to a duty to compel appointment of a lay advocate and mandate was therefore improper.
Reversed.
CHIPMAN, P.J., and MILLER, J., concur.
NOTES
[1]  The respondents did file a TR 12(B)(1), 12(B)(6) motion to dismiss, but failed to include other defenses or objections permitted by TR 12 and then available.
[2]  "Serious misconduct" or "grievous loss" is that which will cause the loss of a due process protected interest, such as the loss of "good time." Wolff, 418 U.S. at 557-59, 94 S.Ct. at 2975-76; Dunn, 377 N.E.2d at 876.
[3]  The relevant portion of the "rules and regulations" provided by petitioners is as follows:

(f) Lay Advocate:
The inmate may request the assistance of a lay advocate of his choice in preparing his case and representing himself at the hearing. As previously noted, the screening officer, (at the preliminary hearing) shall inform the inmate of his right to request a lay advocate, and ask the inmate whether he desires representation. However, representation need not be authorized unless it is first determined that the inmate is illiterate or that the complexity of the issues involved make it unlikely that the inmate will be able to collect and present the evidence necessary for an adequate comprehension of the case. In determining the complexity of the issues, the inmate's intelligence and ability to comprehend and articulate will be taken into consideration. An inmate who is confined in segregation, and thus unable to collect information, should be entitled to the assistance of a lay advocate in preparing and presenting his case. Where it is clearly evident that an inmate does not possess the capacity needed to prepare and present his case, a lay advocate should be appointed to assist said inmate. Notwithstanding the above an inmate charged with an act which could result in the deprivation of any portion or all of the felony good time previously earned shall be granted the assistance of a lay advocate if he so desires.
For the purpose of this policy, a lay advocate may be an institutional staff member or another inmate presently incarcerated in that institution, who is not then in segregation. However, no staff member or inmate will be required to represent an inmate against his will. A lay advocate should be given adequate time to speak with the inmate and interview requested witnesses where appropriate. While it is expected that a lay advocate will have had ample time to prepare prior to the hearing, delays in the hearing to allow for adequate preparation may be ordered by the screening officer or Conduct Adjustment Board.
