Yes, and what laws have congress passed regarding employee compensation?
And if they have passed any such laws, by what legal authority?
I imagine that by accepting TARP money they simply agree to follow the congressional rules. No-one says they have to accept Federal money. If an organization takes Federal grant money for whatever reason, they also agree to follow whatever rules the Fed wants them to.
I am just saying it isn't like this stuff is blind-siding these companies. They knew what they were agreeing to when the asked for Federal help, and compensation oversight was certainly part of that. It would be different if this was random, after the fact stuff for fully private companies, but it isn't. TARP has requirements built into it, and so do the non-TARP bailout programs.
They have legal authority because these private enterprises voluntarily accepted Federal oversight when they asked for Federal money. They entered a contract with the Fed, and part of that contract was giving up some corporate sovereignty.
Stupid? Maybe...if their choice was bailout money or total failure it might have been tough to refuse. Right or wrong? It doesn't matter. Legal? Certainly, since the programs are all voluntary. GM did not have to give the Fed a majority stock holding and agree to total oversight, they could have just let things collapse or sold out to some other company for pennies on the dollar. Any of them could have.
(Edit: Legal as within commonly accepted Federal authority. If you are arguing it is wrong because the government should not be able to do something like TARP in the first place, commerce clause abuse, etc. then fine, but that is another discussion.)