110 DWORD DomainSize = 0;
141 (NameSize + DomainSize) *
sizeof(
TCHAR));
149 Domain =
Name + NameSize;
152 Domain[0] =
_T(
'\0');
190 while (FullFileName[
i] !=
_T(
'\0'))
191 FullFileName[
i++] =
_T(
' ');
236 goto PrintSpecialAccess;
305 if ((
Ace->Mask & AccessRights[
x].Access) == AccessRights[
x].Access)
308 for (
x2 = 0;
x2 < IndentAccess;
x2++)
331 if (SidString !=
NULL)
367 if (*
pch !=
_T(
'\\'))
703 if (
_tcscmp(FindData.cFileName,
_T(
".")) == 0 ||
704 _tcscmp(FindData.cFileName,
_T(
"..")) == 0)
#define IDS_FILE_APPEND_DATA
#define IDS_STANDARD_RIGHTS_ALL
#define IDS_FILE_READ_ATTRIBUTES
#define IDS_FILE_GENERIC_WRITE
#define IDS_GENERIC_EXECUTE
#define IDS_GENERIC_WRITE
#define IDS_SPECIFIC_RIGHTS_ALL
#define IDS_FILE_READ_DATA
#define IDS_FILE_GENERIC_EXECUTE
#define IDS_FILE_DELETE_CHILD
#define IDS_SPECIAL_ACCESS
#define IDS_FILE_WRITE_EA
#define IDS_FILE_WRITE_DATA
#define IDS_MAXIMUM_ALLOWED
#define IDS_FILE_WRITE_ATTRIBUTES
#define IDS_STANDARD_RIGHTS_REQUIRED
#define IDS_FILE_GENERIC_READ
#define IDS_ACCESS_SYSTEM_SECURITY
void ConPuts(FILE *fp, LPCWSTR psz)
#define ConInitStdStreams()
void ConPrintf(FILE *fp, LPCWSTR psz,...)
void ConResPuts(FILE *fp, UINT nID)
VOID DisplayString(LPWSTR Msg)
static BOOL DenyUserAccess(LPCTSTR FilePath, LPCTSTR File, LPCTSTR User)
static BOOL PrintFileDacl(IN LPTSTR FilePath, IN LPTSTR FileName)
static VOID PrintError(DWORD dwError)
static BOOL ChangeFileACL(LPCTSTR FilePath, LPCTSTR File)
static BOOL GrantUserAccessRights(LPCTSTR FilePath, LPCTSTR File, LPCTSTR User, TCHAR Perm)
static BOOL ReplaceUserAccessRights(LPCTSTR FilePath, LPCTSTR File, LPCTSTR User, TCHAR Perm)
static GENERIC_MAPPING FileGenericMapping
static BOOL PrintDaclsOfFiles(LPCTSTR pszFiles)
static VOID AddBackslash(LPTSTR FilePath)
static BOOL EditUserAccessRights(LPCTSTR FilePath, LPCTSTR File, LPCTSTR User, TCHAR Perm)
static BOOL ChangeACLsOfFiles(LPCTSTR pszFiles)
static BOOL ChangeACLsOfFilesInCurDir(LPCTSTR pszFiles)
static BOOL GetPathOfFile(LPTSTR FilePath, LPCTSTR pszFiles)
static BOOL RevokeUserAccessRights(LPCTSTR FilePath, LPCTSTR File, LPCTSTR User)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI GetAce(PACL pAcl, DWORD dwAceIndex, LPVOID *pAce)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define ERROR_ACCESS_DENIED
BOOL WINAPI FindClose(HANDLE hFindFile)
GLint GLint GLint GLint GLint x
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
enum _SID_NAME_USE SID_NAME_USE
#define ERROR_FILE_NOT_FOUND
struct _SECURITY_DESCRIPTOR * PSECURITY_DESCRIPTOR
_In_ ACCESS_MASK AccessMask
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
#define SPECIFIC_RIGHTS_ALL
#define FILE_GENERIC_EXECUTE
#define ACCESS_SYSTEM_SECURITY
#define FILE_READ_ATTRIBUTES
#define FILE_DELETE_CHILD
#define FILE_WRITE_ATTRIBUTES
#define STANDARD_RIGHTS_ALL
#define FILE_ATTRIBUTE_DIRECTORY
#define FILE_GENERIC_READ
#define FILE_GENERIC_WRITE
#define STANDARD_RIGHTS_REQUIRED
_In_ ULONG _In_ ULONG _In_ ULONG Length
INT ConMsgPuts(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId)
#define ConvertSidToStringSid
BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL *pDacl, LPBOOL lpbDaclDefaulted)
#define LANG_USER_DEFAULT
DWORD WINAPI GetLastError(void)
#define GetFileAttributes
VOID WINAPI MapGenericMask(PDWORD, PGENERIC_MAPPING)
#define SetCurrentDirectory
#define FORMAT_MESSAGE_FROM_SYSTEM
#define GetCurrentDirectory
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
#define ERROR_NO_SECURITY_ON_OBJECT
#define ERROR_NO_MORE_FILES
#define ERROR_NONE_MAPPED
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
#define CONTAINER_INHERIT_ACE
#define DACL_SECURITY_INFORMATION
#define OBJECT_INHERIT_ACE
#define ACCESS_DENIED_ACE_TYPE