1 // 2 // SecurityDescriptor.h: interface for the CSecurityDescriptor class. 3 // 4 ////////////////////////////////////////////////////////////////////// 5 6 #if !defined(SECURITYDESCRIPTOR_H__71D0A7E6_8A00_11D3_9103_204C4F4F5020__INCLUDED_) 7 #define SECURITYDESCRIPTOR_H__71D0A7E6_8A00_11D3_9103_204C4F4F5020__INCLUDED_ 8 9 BOOL GetTextualSid( 10 PSID pSid, // binary Sid 11 LPTSTR TextualSid, // buffer for Textual representation of Sid 12 LPDWORD lpdwBufferLen // required/provided TextualSid buffersize 13 ); 14 15 const TCHAR * GetSidTypeName(SID_NAME_USE Use); 16 17 class CSecurityDescriptor 18 { 19 public: 20 void GetCurrentACE_Flags(BYTE& bFlags); 21 void GetCurrentACE_AccessMask(DWORD& dwMask); 22 PSID GetCurrentACE_SID(); 23 enum ACEntryType 24 { 25 Unknown, 26 AccessAlowed, 27 AccessDenied, 28 SystemAudit 29 }; 30 ACEntryType GetDACLEntry(DWORD nIndex); 31 ACEntryType GetSACLEntry(DWORD nIndex, BOOL& blnFailedAccess, BOOL& blnSeccessfulAccess); 32 DWORD GetDACLEntriesCount(); 33 DWORD GetSACLEntriesCount(); 34 BOOL HasValidDACL(); 35 BOOL HasNULLDACL(); 36 BOOL HasValidSACL(); 37 BOOL HasNULLSACL(); 38 BOOL DescriptorContainsDACL(); 39 BOOL DescriptorContainsSACL(); 40 DWORD BeginDACLInteration(); 41 DWORD BeginSACLInteration(); 42 void AssociateDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor); 43 CSecurityDescriptor(); 44 virtual ~CSecurityDescriptor(); 45 private: 46 PSECURITY_DESCRIPTOR m_pSecurityDescriptor; 47 BOOL m_blnDACLPresent; 48 BOOL m_blnDACLDefaulted; 49 PACL m_pDACL; 50 BOOL m_blnSACLPresent; 51 BOOL m_blnSACLDefaulted; 52 PACL m_pSACL; 53 ACE_HEADER *m_pCurrentACEHeader; 54 }; 55 56 #endif // !defined(SECURITYDESCRIPTOR_H__71D0A7E6_8A00_11D3_9103_204C4F4F5020__INCLUDED_) 57