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.

57 lines
1.5 KiB

  1. /*
  2. * CSecureShare.h - header file for CSecureShare class.
  3. *
  4. * Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  5. *
  6. *
  7. * Created: 12-14-1997 by Sanjeev Surati
  8. * (based on classes from Windows NT Security by Nik Okuntseff)
  9. */
  10. #if !defined __CSECURESHARE_H__
  11. #define __CSECURESHARE_H__
  12. #include "SecurityDescriptor.h" // CSid class
  13. ////////////////////////////////////////////////////////////////
  14. //
  15. // Class: CSecureShare
  16. //
  17. // This class is intended to encapsulate the security of an
  18. // NT File or Directory. It inherits off of CSecurityDescriptor
  19. // and it is that class to which it passes Security Descriptors
  20. // it obtains, and from which it receives previously built
  21. // security descriptors to apply. It supplies implementations
  22. // for AllAccessMask(), WriteOwner() and WriteAcls().
  23. //
  24. ////////////////////////////////////////////////////////////////
  25. #ifdef NTONLY
  26. class CSecureShare : public CSecurityDescriptor
  27. {
  28. // Constructors and destructor
  29. public:
  30. CSecureShare();
  31. CSecureShare(PSECURITY_DESCRIPTOR pSD);
  32. ~CSecureShare();
  33. CSecureShare( CHString& chsShareName);
  34. DWORD SetShareName( const CHString& chsShareName);
  35. virtual DWORD AllAccessMask( void );
  36. protected:
  37. virtual DWORD WriteOwner( PSECURITY_DESCRIPTOR pAbsoluteSD );
  38. virtual DWORD WriteAcls( PSECURITY_DESCRIPTOR pAbsoluteSD , SECURITY_INFORMATION securityinfo );
  39. private:
  40. CHString m_strFileName;
  41. };
  42. #endif
  43. #endif // __CSecureShare_H__