Corruption in jails condoned by 'top officials'