Leaked source code of windows server 2003
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.

64 lines
2.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: printsi.h
  8. //
  9. // This file contains the definition of the CPrintSecurity object.
  10. //
  11. //--------------------------------------------------------------------------
  12. #ifndef _PRINTSI_H_
  13. #define _PRINTSI_H_
  14. #include "si.h"
  15. STDMETHODIMP
  16. CheckPrinterAccess(LPCTSTR pszObjectName,
  17. LPDWORD pdwAccessGranted,
  18. LPTSTR pszServer,
  19. ULONG cchServer);
  20. DWORD LoadWinSpool();
  21. class CPrintSecurity : public CSecurityInformation
  22. {
  23. public:
  24. CPrintSecurity(SE_OBJECT_TYPE seType) : CSecurityInformation(seType) {}
  25. STDMETHOD(Initialize)(HDPA hItemList,
  26. DWORD dwFlags,
  27. LPTSTR pszServer,
  28. LPTSTR pszObject);
  29. // ISecurityInformation methods
  30. STDMETHOD(SetSecurity)(SECURITY_INFORMATION si, // override
  31. PSECURITY_DESCRIPTOR pSD);
  32. STDMETHOD(GetAccessRights)(const GUID* pguidObjectType,
  33. DWORD dwFlags,
  34. PSI_ACCESS *ppAccess,
  35. ULONG *pcAccesses,
  36. ULONG *piDefaultAccess);
  37. STDMETHOD(MapGeneric)(const GUID *pguidObjectType,
  38. UCHAR *pAceFlags,
  39. ACCESS_MASK *pmask);
  40. STDMETHOD(GetInheritTypes)(PSI_INHERIT_TYPE *ppInheritTypes,
  41. ULONG *pcInheritTypes);
  42. STDMETHOD(GetInheritSource)(SECURITY_INFORMATION si,
  43. PACL pACL,
  44. PINHERITED_FROM *ppInheritArray);
  45. protected:
  46. // Override these
  47. STDMETHOD(ReadObjectSecurity)(LPCTSTR pszObject,
  48. SECURITY_INFORMATION si,
  49. PSECURITY_DESCRIPTOR *ppSD);
  50. STDMETHOD(WriteObjectSecurity)(LPCTSTR pszObject,
  51. SECURITY_INFORMATION si,
  52. PSECURITY_DESCRIPTOR pSD);
  53. };
  54. #endif /* _PRINTSI_H_ */