It happens all the time. The US Government is deeply involved in M$ code, and builds unique versions of Windows for things like running Aircraft Carriers:
http://www.fcw.com/fcw/articles/2000/0807/news-navy-08-07-00.asp
There are many new joint projects with DoD going on right now as well in the DC area. Got any other reasons why the US government should rely on code managed by a foreigner instead?
Because it does not have into be managed by a foreigner. The baseline Linux kernel can be modified at will to a US-government specific version.
BTW, that article doesn't actually have Microsoft modifying the Windows OS itself, or actually opening it up for inspection by the Navy. Instead, they're developing apps and doing systems integration. But they could do that for a Linux platform, too.
And given Microsoft's security problems (which are probably tied to extremely poor configuration management in the OS kernel and libraries, IMNHO), I think the USN is making a bad mistake. I would NOT trust Microsoft in this matter until they've actually had a substantial length of time between major security flaws getting exploited.
Because it can fork Linux for its own internal releases and not have to release the source code. It is entirely possible for the government to wait until Linux 2.6, fork that and build a custom OS based on Linux for its own internal uses.
I personally would rather the government choose quality over nationality. I want the military to run on only the best of everything. In the military's trade anything going wrong not only gets people maimed or killed, it exposes the populus of the US to the same. I'd rather the US Government worked with QNX to build a modified QNX for our aircraft carriers than the gov't use WindowsNT. QNX is infinitely more reliable than NT. Of course the ideal situation is that they keep writing custom OSs for their weapon systems as they have in the past.
The continuation of the constitutional order and our existance as a free republic are what matter to me. Corporate America be damned if we have to choose between doing what is needed to keep us free and what is needed to keep us rich. As I said, the military should run on only the best. Whether Americans were the sole beneficiaries of the contracts should never be a consideration. While it is better to build the vast majority of our systems here, sometimes using foreigners is the only good option. Does it ever occur to you that many foreigners are professionals and won't screw us over? Did it ever occur to you that people like Torvalds probably do see the US as superior to hellholes like North Korea and China? You'd be wise to rethink your, what seems to be, quasi-phobia of foreigners.
And I have news for you, sometimes our biggest threats on technology are American! Remember the Rosenbergs?