Section 29. The record required by the preceding section shall not be published except so far as may be necessary for the identification of persons convicted of larceny or any felony after their release from prison; but the officer in charge of a prison shall exhibit the record to any person upon the order of a justice of the superior court or of a district attorney. A copy of the descriptions including copies of finger prints, photographs and criminal histories shall upon request be furnished by the officer in charge of any prison to the colonel of state police or to the principal officer of a prison in any other state which requires by law the finger printing and description of convicts and has provided for furnishing information concerning criminals to other states. However, publication of any records required by section twenty-eight which are kept on systems operated by the department of criminal justice information services shall be in accordance with the regulations of said board.