Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
32 KiB

  1. // =========================================================================== // UAMMain.cp � 1997-2000 Microsoft Corp. All rights reserved. // =========================================================================== // Main unit for Microsoft User Authentication Method. // // Notes: // -------------------------------------------------------------------------- // // // Version History: // =========================================================================== // 04.22.97 MJC - Begin coding version 5.0. // 05.22.97 MJC - Completed version 5.0d5, getting close. // 02.21.98 MJC - Begin updating for AppleShare 3.8 and AFP/TCP. // 03.02.98 MJC - First working version (5.0d12) with AS Client v3.8a1lawJ // 03.26.98 MJC - Implemented change password. It works, but not when the // password has expired on the server. I suspect a bug in // in AppleShare Client 3.8a1LawL which doesn't open a session // when the error code returned is not noErr. // 03.31.98 MJC - First checkin into VSS database. // // Version 5.0d15: // 04.13.98 MJC - Changed the way supported UAM's are recorded (bitmap vice // a struct of booleans). // - Change some error code determination code in UAM_OpenSession() // and UAM_MSUAMContLogin(). // - Added version string at bottom of dialog window. // // Version 5.0d16: // 04.30.98 MJC - Fixed bug in UAMDSNetwork.c where the AFP login command block // would not always end on an even boundary. // - Added some additional asserts to UAM_DSLoginMSUAM(). // - Changed instances of astring[0] to PSTR_LENGTH(astring). // // Version 5.0d17: // 05.19.98 MJC - Updated for new ClientUAM.h from Apple. Now the main // entry returns OSStatus vice OSErr. // // Version 5.0b2: // 06.08.98 MJC - Added new event callback routine for AS and the Chooser // in the login dialog filter. // Version 5.0b3: // 09.01.98 MJC - Fixed bug where null passwords weren't allowed. // 10.23.98 MJC - Fixed bug where you could use cmd-g to select Guest // radio even though it was disabled. // - Can now use cut, copy and paste in User Name field. // - Changed 'OK' button to 'Connect' to match Apple's UAM // - Clicking on 'Registered User' when it is already // doesn't cause a flash anymore or select the user name. // 11.13.98 MJC - Added support for passing the actual encrypted password // over the wire for cleartxt storage updating when // changing password. // MJC - Added support for notifying the user that their password // is about to expire. // 12.01.98 MJC - Fixed bug were I wasn't reversing the byte order of the // returned password expiration time. // 01.22.99 MJC - CheckGatedControls() would step 1 too far in the array. // - Could not use escape key if username len maxed out. // Version 5.0.1: // 07.12.99 MJC - More problems with UAM_CheckGatedControls(), hopefully all // fixed this time. // Made small change in MS_VersionUserItem() so we compile // under CW Pro 5. // Version 5.0.2: // 10.21.99 MJC - Fixed bug on double byte character OS's (CHX, JPN, etc) // where first char in password was getting dropped. // - Now select all the password text after a login failure. // Version 5.0.3: // 10.29.99 MJC - Fixed bug on international systems where hitting // backspace would yield incorrect results (got rid of one // char instead of the double byte char). // - Related to fix above, change password field entry diaplay // character to '*' instead of '�'. // Version 5.0.4: // 11.17.99 MJC - Fixed bug in encrypt.c, wasn't locking resource handle, // so password OWF was incorrectly generated. // - SetupUAMEncrypt() was not returning a fail code // if loading the data table failed. // Version 5.0.5: // 11.22.99 MJC - Put 2 0x00 bytes at the end of the initial login call for // NT4 SP6. // 12.01.99 MJC - Finished keychain support. // - NOTE: You must now compile the MS UAM with Universal // headers v3.3 or later. // - Can finally build PPC! The