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.

66 lines
1.7 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // userr.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class UserRestrictions.
  12. //
  13. ///////////////////////////////////////////////////////////////////////////////
  14. #ifndef USERR_H
  15. #define USERR_H
  16. #if _MSC_VER >= 1000
  17. #pragma once
  18. #endif
  19. #include <iastl.h>
  20. #include <iastlutl.h>
  21. using namespace IASTL;
  22. ///////////////////////////////////////////////////////////////////////////////
  23. //
  24. // CLASS
  25. //
  26. // UserRestrictions
  27. //
  28. ///////////////////////////////////////////////////////////////////////////////
  29. class ATL_NO_VTABLE UserRestrictions:
  30. public IASRequestHandlerSync,
  31. public CComCoClass<UserRestrictions, &__uuidof(URHandler)>
  32. {
  33. public:
  34. IAS_DECLARE_REGISTRY(URHandler, 1, IAS_REGISTRY_AUTO, IASTypeLibrary)
  35. protected:
  36. virtual IASREQUESTSTATUS onSyncRequest(IRequest* pRequest) throw ();
  37. private:
  38. // Helper functions for each of the restrictions we enforce.
  39. BOOL checkAllowDialin(IAttributesRaw* request);
  40. BOOL checkTimeOfDay(IAttributesRaw* request);
  41. BOOL checkAuthenticationType(IAttributesRaw* request);
  42. BOOL checkCallingStationId(IAttributesRaw* request);
  43. BOOL checkCalledStationId(IAttributesRaw* request);
  44. BOOL checkAllowedPortType(IAttributesRaw* request);
  45. BOOL checkPasswordMustChange(IASRequest& request);
  46. BOOL checkCertificateEku(IASRequest& request);
  47. BOOL checkStringMatch(
  48. IAttributesRaw* request,
  49. DWORD allowedId,
  50. DWORD userId
  51. );
  52. // Default buffer size for retrieving attributes.
  53. typedef IASAttributeVectorWithBuffer<16> AttributeVector;
  54. };
  55. #endif // USERR_H