Will the computer be confiscated until I get his password and pass it on to the authorities?
If Customs have reasonable suspicion that there is illegal material under the other user name on your computer then I guess there is every possibility they would hold it until all the data could be looked at. If you are so concerned, why not get your flatmate to give you an envolope with his login and password written down. Seal and sign all the edges for real super spook security and keep it in your PC bag. If you need to open the envolope, tell your flat mate later of the circumstances. Problem solved.