
    Submitted February 1,
    affirmed February 21,
    petition for rehearing denied April 26, 1961
    GIBBS v. GLADDEN
    359 P. 2d 540
    
      Lillard James Gibbs, Salem, in propria persona, filed briefs for appellant.
    Robert Y. Thornton, Attorney General, and Robert G. Danielson, Assistant Attorney General, Salem, filed a brief for respondent.
    Before McAllister, Chief Justice, and Rossman, Warner, Perry, Sloan, O’Connell and Goodwin, Justices.
   PER CURIAM.

Petitioner is a prisoner in the Oregon State Penitentiary. He appeals from an order of the circuit court dismissing proceedings in which the petitioner sought judicial relief against the warden of the penitentiary by a petition for a writ of habeas corpus.

The petition was drawn without the aid of counsel, but the trial court gave it careful consideration and permitted supplemental petitions to be filed. What the petitioner apparently sought, however, was not to test the legality of his imprisonment but rather to question the internal operations of the institution. The petitioner assigns two errors:

The first alleged error is the refusal of the trial judge to allow a motion for a change of judge after making certain preliminary rulings in the cause. The applicable statute, ORS 14.270, provides, inter alia, “but no motion to disqualify a judge to whom a case has been assigned for trial shall be made after the judge has ruled upon any petition, demurrer or motion other than a motion to extend time in the cause, * * *."

The case was duly assigned to Judge Jones. The judge thereafter ruled upon three motions, other than motions to extend time, before the motion for a change of judge was filed. The motion for a change of judge therefore was not timely made. This assignment of error is not well taken.

The other assignment of error challenges the ruling of the trial court in sustaining a demurrer to the petition. The trial court held in effect that habeas corpus will not provide a remedy for the petitioner’s grievances. We concur.

The petitioner’s grievances may be summarized briefly.

1. He has been punished for infractions of institutional rules without having been given written notice of the rules prior to the alleged infractions.

2. He has been denied access to the institution’s education program while in segregation as part of his punishment for alleged violations of institutional rules.

3. He has not been permitted access to certain legal publications while in segregation.

4. Copies of advance sheets published by the West Publishing Company, and for which the petitioner has paid, have been withheld from him.

5. The warden has refused to allow the petitioner statutory good behavior time (OHS 421.120) for periods served in segregation.

6. Petitioner has not been allowed canteen or outdoor exercise privileges while in segregation.

The demurrer having admitted the truth of the above specifications of the petition, the only question before the court is whether relief is available in habeas corpus.

There was no allegation that the petitioner’s sentence would have expired if the credits under ORS 421.120 liad been allowed. There is therefore no allegation that the petitioner is unlawfully restrained. The petitioner’s restraint is presumably lawful under a sentence which has not been vacated or modified. Smallman v. Gladden, 206 Or 262, 291 P2d 749.

The purpose of the writ of habeas corpus is set forth in ORS 34.310. It is to inquire into the legality of imprisonment, not to supervise the administration of the institution. Long v. Minto, 81 Or 281, 158 P 805.

The trial court properly sustained the demurrer to the petition, as it failed to state facts constituting grounds upon which the court could issue the writ.

Affirmed.  