French President Nicolas Sarkozy has announced new measures to deal with repeat sex offenders in response to a paedophile scandal.
Mr Sarkozy met the assaulted boy's father
Mr Sarkozy said a secure hospital would be built to detain paedophiles.
In future, he added, offenders would not be released until doctors had decided they were no longer dangerous.
The moves follow an admission by a prison doctor that he prescribed Viagra to a serial child molester accused of attacking a boy after his release.
The doctor told police he had not been given access to the criminal records of the man, who had told him he wanted relationships with women.
President Sarkozy said the government wanted to draw conclusions from an "unacceptable situation which has greatly shocked the French".
He added that "everything must be done to make sure this won't happen again".
The alleged aggressor, Francis Evrard, was a convicted paedophile who had spent most of the past 30 years behind bars.
Yet within weeks of his release in early July, the 61-year-old had been left unsupervised.
Speaking after meeting senior ministers, Mr Sarkozy said that in future sex offenders would have to complete their sentences. Evrard had served 18 years of a 27-year term.
Mr Sarkozy added that serving a full term would not necessarily mean freedom. Sex offenders still regarded as a threat could be detained in a secure hospital to be built in the central city of Lyon.
Under certain circumstances, Mr Sarkozy said, they would be allowed to leave the hospital. They would be tagged, and some may be chemically castrated.
Evrard, 61, was found with a five-year-old boy within a few hours of the boy's abduction, police say.
He was located with the help of a new nationwide alert system that makes intense use of radio and television announcements as well as public notices at train stations and on highways.
The boy was abducted in a garage in the northern town of Roubaix on 15 August.
Before the emergency cabinet meeting, Mr Sarkozy met the boy's father and grandfather.
Magistrates and health professionals complain that a lack of resources means medical treatment and monitoring procedures for released offenders are not carried out effectively.