
28 Cal.App.3d 1038 (1972)
105 Cal. Rptr. 126
JEAN D. MATHIS, Petitioner,
v.
THE APPELLATE DEPARTMENT OF THE SUPERIOR COURT OF SACRAMENTO COUNTY et al., Respondents.
Docket No. 13574.
Court of Appeals of California, Third District.
November 14, 1972.
*1039 COUNSEL
Mull & Mull, Archibald M. Mull III and Edwin J. Bouillon, Jr., for Petitioner.
Evelle J. Younger, Attorney General, Edward A. Hinz, Jr., Chief Assistant Attorney General, Doris H. Maier, Assistant Attorney General, Edward W. Bergtholdt, James T. McNally, Nelson P. Kempsky and Daniel J. Kremer, Deputy Attorneys General, for Respondents.
OPINION
RICHARDSON, P.J.
This matter is before us following issuance of an alternative writ of mandate after denial of petitioner's motion to suppress evidence in the municipal court, which action was affirmed without opinion by the appellate department of the superior court.
Petitioner was originally charged with a misdemeanor, possession of a restricted dangerous drug, in violation of Health and Safety Code section 11910. She thereafter filed a motion to suppress evidence under Penal Code section 1538.5, subdivision (g), which motion was denied, and she appealed under section 1538.5, subdivision (j), and rule 181, California Rules of Court.
The sole issue presented by the petition is whether the search of petitioner's car constituted an unreasonable search within the meaning of the Fourth Amendment.

Facts
On Sunday, December 19, 1971, petitioner's vehicle entered the Rio *1040 Consumnes Correctional Center in southern Sacramento County through a driveway and entrance into a parking lot immediately adjacent to the facility. Petitioner's vehicle came to a stop in a parking space in the parking lot and the motor was turned off. Deputy Sheriff Robert Lopez, then on duty at the center, and a companion officer approached petitioner's vehicle and asked petitioner and the two other occupants to step out of the car in order that the vehicle could be searched. The three complied and stepped to the rear of the car. Lopez commenced a search of the car and found in the glove compartment of the vehicle a vial containing six-and-a-half pills, which were a restricted dangerous drug within the meaning of Health and Safety Code section 11910.
Evidence elicited at the hearing on the motion to suppress indicated that persons approaching and entering the parking lot, such as petitioner, upon leaving Bruceville Road and entering the center, passed at Bruceville Road a sign containing the name of the facility and the admonition to drive slowly. At the point where the entry road joins the parking lot proper, there is and was at the time in question a sign which notifies visitors that "ALL VEHICLES ARE SUBJECT TO SEARCH." The correctional center began searching visitors' cars in November 1970. Cars were searched every Sunday during visiting hours and occasionally during the balance of the week, apparently on a random basis. Justification of the action was based upon the statement of Lopez at the hearing on the motion to suppress that it was required in order to intercept "narcotic traffic coming into the correctional center itself." Lopez testified that search of the occupants rather than the car was impractical because five to seven hundred people per visiting day entered the facility. The purses belonging to women who do enter the facility are searched.
Of the approximately 250 vehicles entering the facility each Sunday, more than 100 are searched, apparently on a random basis.
Evidence produced by the petitioner indicated that a substantially fewer number of vehicles than those described by Lopez were searched, and that these belonged to young persons, particularly "long hairs."
(1) The issue presented is whether or not the state or its agencies may validly establish as a condition to entry into a parking lot which is part of a custodial facility that the vehicle be subject to search. We conclude that the driver and occupants of a motor vehicle may reasonably be deemed to have consented to search of the vehicle which enters and then parks on such a parking lot after passing a sign apprising the motorist that he is entering a correctional facility, and that a vehicle which enters is subject to search.
*1041 The United States Court of Appeals in United States v. Epperson (4th Cir.1972) 454 F.2d 769, 771, has established the following standard: "The reasonableness of any search must be determined by balancing the governmental interest in searching against the invasion of privacy which the search entails. These interests must be balanced at two stages: the search must be `justified at its inception' and `reasonably related in scope to the circumstances which justified the interference in the first place.'" In the matter before us the governmental interest sought to be protected is the security of the custodial institution against importation of contraband. (2) It is a fact sufficiently well known to warrant judicial notice that contraband is smuggled into custodial institutions. The Legislature by the enactment of Penal Code section 4573 has specifically recognized the problem, declaring such conduct a crime. It follows, accordingly, that the custodial officers are therefore well justified in taking reasonable precautions to prevent such traffic.
Petitioner, seeking to visit an inmate of a custodial institution, is exercising a privilege, not a right. The county sheriff has the official charge for the maintenance of the security of the facility, and in carrying out his obligation may reasonably regulate its operation. (Clifton v. Superior Court (1970) 7 Cal. App.3d 245, 255 [86 Cal. Rptr. 612]; Gov. Code, §§ 26600, 26605.) Prison officials may regulate the visitation of prisoners. We quote applicable language from People v. Jones (1971) 19 Cal. App.3d 437, 449 [96 Cal. Rptr. 795]: "Consequently, prison authorities may subject inmates to intense surveillance and search unimpeded by Fourth Amendment barriers. [Citation.] ... Prison officials may regulate communications and visitation. [Citations.]" It necessarily follows that they may restrict the manner of visitation by conditioning the privilege in ways reasonably consistent with the security of the facility.
The peremptory writ is denied and the alternative writ is discharged.
Regan, J., and Coakley, J.,[*] concurred.
A petition for a rehearing was denied December 4, 1972, and petitioner's application for a hearing by the Supreme Court was denied January 11, 1973.
NOTES
[*]   Retired Associate Justice of the Court of Appeal sitting under assignment by the Chairman of the Judicial Council.
