By comparison with America every government on earth is defective. Musharraf has done very well indeed, considering what he has to work with.
So I guess you are okay with terrorists training outside Musharraf's backyard and coming back to the US? Can the standards been any lower? Why not apply the same standard to Iran? Afterall, the rulers there face threats from the Ayatollahs and have very little to work with.