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.

77 lines
2.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // NTSamNames.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file declares the class NTSamNames.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 04/13/1998 Original version.
  16. // 04/25/1998 Added localOnly flag.
  17. // 08/21/1998 Remove tryToCrack property.
  18. // 09/08/1998 Added realm stripping.
  19. // 09/10/1998 Remove localOnly flag.
  20. // 01/20/1999 Add DNIS/ANI/Guest properties.
  21. // 03/19/1999 Add overrideUsername flag.
  22. // 02/15/2000 Remove realms support.
  23. //
  24. ///////////////////////////////////////////////////////////////////////////////
  25. #ifndef _NTSAMNAMES_H_
  26. #define _NTSAMNAMES_H_
  27. #include <cracker.h>
  28. #include <iastl.h>
  29. ///////////////////////////////////////////////////////////////////////////////
  30. //
  31. // CLASS
  32. //
  33. // NTSamNames
  34. //
  35. // DESCRIPTION
  36. //
  37. // Implements a request handler that converts the RADIUS User-Name
  38. // attribute to a fully qualified NT4 account name.
  39. //
  40. //
  41. ///////////////////////////////////////////////////////////////////////////////
  42. class ATL_NO_VTABLE NTSamNames :
  43. public IASTL::IASRequestHandlerSync,
  44. public CComCoClass<NTSamNames, &__uuidof(NTSamNames)>
  45. {
  46. public:
  47. IAS_DECLARE_OBJECT_ID(IAS_PROVIDER_MICROSOFT_NTSAM_NAMES)
  48. IAS_DECLARE_REGISTRY(NTSamNames, 1, 0, IASTypeLibrary)
  49. NTSamNames() throw ()
  50. : identityAttr(1), defaultIdentity(NULL), defaultLength(0)
  51. { }
  52. //////////
  53. // IIasComponent.
  54. //////////
  55. STDMETHOD(Initialize)();
  56. STDMETHOD(Shutdown)();
  57. protected:
  58. virtual IASREQUESTSTATUS onSyncRequest(IRequest* pRequest) throw ();
  59. // Prepends the default domain to username.
  60. static PWSTR prependDefaultDomain(PCWSTR username);
  61. DWORD overrideUsername; // TRUE if we should override the User-Name.
  62. DWORD identityAttr; // Attribute used to identify the user.
  63. PWSTR defaultIdentity; // Default user identity.
  64. DWORD defaultLength; // Length (in bytes) of the default user identity.
  65. NameCracker cracker; // Used for cracking UPNs.
  66. };
  67. #endif // _NTSAMNAMES_H_