Here's Wikipedia:
Shortly after Musharraf's takeover, several people filed court petitions challenging his assumption of power. However he got The Oath of Judges Order 2000 issued. It required the judges to take a fresh oath of office swearing allegiance to military rule. Judges must swear that they will make no decisions against the military rule. Many judges refused and resigned in protest. Subsequently on May 12, 2000, the Supreme Court of Pakistan now filled with judges of the General's pleasing and who had now taken oath not to take any decisions against the Military Junta, ordered Musharraf to hold general elections by October 12, 2002.
Musharraf has refused to give up his position as the head of the army, a move that has been criticized from all sides inside and outside the country. No pressure has ever been applied by the United States to force a change in his stance. Pakistan is ranked 142nd in the world for fighting corruption.
Musharraf has been considerably weakened after he suspended the Chief Justice of Pakistan - not by extremists, but by the moderates in the majority. The Supreme Court later reinstated the Chief Justice.
His position on Al-Qaeda has always been mixed at best as we offer him all carrot and no stick. That policy has failed. I don't suggest replacing the carrot with a stick, but the judicious use of the stick is a necessary component of dealing with, at best, a half-hearted ally.