Windows XP's code was leaked yesterday. This post is mostly just a dump/repost of interesting things other people on the internet found.
Even though I don't say how to get the full source code in this article, I'm still a bit anxious that Microsoft is going to get me in trouble. But mainstream support for XP ended over a decade ago, and Microsoft has open-sourced an old version of Windows before, so hopefully they won't sue me. Still, mainstream media sources seem hesitant to reproduce anything from the leak right now. But maybe they just don't think their readers would care about the details.
Despite the obligatory source code comments complaining about horrible hacks, the code looks pretty clean to me. And judging by the comments, the developers were pretty well-spoken and actually cared about doing their jobs properly. Microsoft from 20 years ago looks like a pretty good place to work overall.
shell/osshell/control/bitmaps/made_pad.jpg
:
shell/osshell/control/bitmaps/prelim.bmp
:
base/ntsetup/oobe/msobshel/res/drinkin.gif
:
Here's an upscaled version of drinkin.gif
for good measure.
shell/osshell/control/bitmaps/nt.bmp
:
shell/osshell/control/bitmaps/std.bmp
:
base/ntsetup/oobe/msobshel/res/cowhd1.gif
:
ASF was Microsoft's proprietary audio/video container format for media streaming.
There's also some pictures of Microsoft's employees at multimedia/opengl/test/misc/uidemo/
. I doubt they'd care if I reproduced their images here—Frans and Marc look especially laid back—But just in case I'm wrong, I won't.
Windows XP used code licensed under the GPL. GPLv2 says:
You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you [...] give any other recipients of the Program a copy of this License along with the Program.
I can't easily find the text of XP's EULA online, so I don't know whether Microsoft honoured the GPL, but it wouldn't surprise me if they violated it in Windows XP, because they definitely did in Windows 7.
Then again, I'm not sure if any of the programs which directly used GPL'd code made it to the end user. The GPL'd code could've just been tools Microsoft used to automate development. Look at the files for which grep -rl 'GNU General Public License'
returns a result:
~/Downloads/XPSP1/NT % grep -rl 'GNU General Public License' enduser/speech/lib/perl/win32/mutex.pm enduser/speech/lib/perl/win32/odbc.pm enduser/speech/lib/perl/win32/ipc.pm enduser/speech/lib/perl/win32/changenotify.pm enduser/speech/lib/perl/win32/pipe.pm enduser/speech/lib/perl/win32/event.pm enduser/speech/lib/perl/win32/semaphore.pm inetsrv/query/sqltext/bison.cpp multimedia/reality/bin/ia64/perl.exe multimedia/reality/bin/i386/perl.exe multimedia/directx/deliveryimages/cabpacks/tools/perl.exe inetcore/setup/ie40/iedl/tools/alpha/perl100.dll inetcore/setup/ie40/iedl/perl/alpha/perl.exe printscan/faxsrv/src/sdktools/msgtools/perl100.dll tools/x86/perl/site/lib/xml/parser/expat/xmlwf/xmlwf.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/codepage.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/unixfilemap.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/xmlfile.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/readfilemap.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/filemap.h tools/x86/perl/site/lib/xml/parser/expat/xmlwf/codepage.h tools/x86/perl/site/lib/xml/parser/expat/xmlwf/win32filemap.c tools/x86/perl/site/lib/xml/parser/expat/xmlwf/xmlfile.h tools/x86/perl/site/lib/xml/parser/expat/gennmtab/gennmtab.c tools/x86/perl/site/lib/xml/parser/expat/xmltok/iasciitab.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmltok_impl.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmlrole.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmltok.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/latin1tab.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/utf8tab.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmlrole.c tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmldef.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmltok_impl.c tools/x86/perl/site/lib/xml/parser/expat/xmltok/asciitab.h tools/x86/perl/site/lib/xml/parser/expat/xmltok/dllmain.c tools/x86/perl/site/lib/xml/parser/expat/xmltok/xmltok.c tools/x86/perl/site/lib/xml/parser/expat/xmlparse/hashtable.h tools/x86/perl/site/lib/xml/parser/expat/xmlparse/xmlparse.c.orig tools/x86/perl/site/lib/xml/parser/expat/xmlparse/xmlparse.c tools/x86/perl/site/lib/xml/parser/expat/xmlparse/hashtable.c tools/x86/perl/site/lib/xml/parser/expat/xmlparse/xmlparse.h tools/x86/perl/site/lib/xml/parser/expat/xmlparse/xmlparse.h.orig tools/x86/perl/site/lib/win32/mutex.pm tools/x86/perl/site/lib/win32/odbc.pm tools/x86/perl/site/lib/win32/changenotify.pm tools/x86/perl/site/lib/win32/ipc.pm tools/x86/perl/site/lib/win32/semaphore.pm tools/x86/perl/site/lib/win32/pipe.pm tools/x86/perl/site/lib/win32/event.pm tools/x86/perl/lib/getopt/long.pm tools/x86/perl/bin/perlcore.dll tools/x86/perl/bin/_perlcore.dll base/ntsetup/patching/bldtools/perlcore.dll admin/darwin/tools/perl100.dll
net/rras/ras/rassfm/arapdes.c
:
/* In mode 2, the 128 bytes of subkey are set directly from the * user's key, allowing him to use completely independent * subkeys for each round. Note that the user MUST specify a * full 128 bytes. * * I would like to think that this technique gives the NSA a real * headache, but I'm not THAT naive. */
For context, I think the "arap" in the above file name stands for "AppleTalk Remote Access Protocol" and the "des" stands for "data encryption standard".
net/config/shell/folder/cmdtable.cpp
:
// !!(A & B) != !!(A & C) means: If either B or C is set in A, both B and C must be set (or neither). I hope... // kill me... kill me now. if ((!!(cpe.dwFlags & NB_NEGATE_VIS_NBM_MATCH) != !!(cpe.dwFlags & NB_NEGATE_ACT_NBM_MATCH)) || (!!(cpe.dwFlags & NB_NEGATE_VIS_NBS_MATCH) != !!(cpe.dwFlags & NB_NEGATE_ACT_NBS_MATCH)) || (!!(cpe.dwFlags & NB_NEGATE_VIS_CHAR_MATCH) != !!(cpe.dwFlags & NB_NEGATE_ACT_CHAR_MATCH)) || (!!(cpe.dwFlags & NB_NEGATE_VIS_PERMS_MATCH) != !!(cpe.dwFlags & NB_NEGATE_ACT_PERMS_MATCH)) ) { sprintf(szErr, "Lines (%d) in the Permissionstable should use NB_NEGATE_xxx instead of NB_NEGATE_VIS_xxx or NB_NEGATE_ACT_xxx ", x+1); AssertSz(FALSE, szErr); hr = E_FAIL; }
inetsrv/iis/svcs/ftp/server/userdb.cxx
:
// // Geezsh, I hate my life. // // Once upon a time, there was a bug in ATQ that cause it to // always pass NO_ERROR as the status to the async completion // routine. This bug caused, among other things, FTP to never // time out idle connections, because it never saw the // ERROR_SEM_TIMEOUT status. So, I fixed the bug in ATQ. // // Now, this completion routine gets the actual status. Well, // that breaks service shutdown when there are connected users. // Basically, when a shutdown occurs, the connected sockets are // closed, causing the IO to complete with ERROR_NETNAME_DELETED. // USER_DATA::ProcessAsyncIoCompletion() is not handling this // error properly, which causes 1) an assertion failure because // USER_DATA::DisconnectUserWithError() is getting called *twice* // and 2) the service never stops because of a dangling reference // on the USER_DATA structure. // // Of course, the proper thing to do would be to fix the offending // code in USER_DATA::ProcessAsyncIoCompletion() so that it DID // handle the error properly. Unfortunately, that fix requires a // nontrivial amount of surgery, and we're a scant three days // from releasing K2 Beta 1. So... // // As a quick & dirty work around for K2 Beta 1, we'll map all // errors other than ERROR_SEM_TIMEOUT to NO_ERROR. This should // provide the lower software layers with the old ATQ behavior // they're expecting. // // REMOVE THIS POST BETA 1 AND FIX USER_DATA PROPERLY!!!! // // 3/12/98 // // N.B. The debug output below has been changed to be a little // more customer friendly but I hate to prevent future developers // for enjoying the original message which read: // "Mapping error %d to NO_ERROR to mask FTP bug (FIX!)\n" // // I'm removing this message because it was the source of some // embarrasment, when a checked version of this DLL was sent to // Ernst & Young to track the now famous bug #138566. //
inetcore/outlookexpress/wabw/wabapi/vcard.c
:
// // It's September of 2000. The European Commission is looking at Outlook for their mail client, // one of the things that is hanging them up is this bug, the WORK URL jumps from the WORK URL // box to the HOME URL if you export/import the vCard. We need this functioning, so I looked // for the vCard 3.0 standard to see how they are handling the URL. Every place I look says that // the people in charge of the vCard standard is www.versit.com, this however is a now defunct web // site, I queried the other companies that use the vCard, Apple, IBM, AT&T all give press releases // telling you to look at the www.versit.com web site, they also give a 1-800 number to call. I've // called the 1-800 number and that number is now a yellow pages operator. I can't find a vCard 3.0 // standard, so...... // // Now, we all wish we could do this: URL;HOME: and URL;WORK:. Well I'm going to do it! //
There's three unfinished themes named "candy", "mallard" and "professional":
The "candy" theme looks a lot like macOS's Aqua: