Added stubs for GetFileSecurityA, SetFileSecurityA and

GetUserName based on Winehq sources to get Dependancy
Walker working again.

svn path=/trunk/; revision=8392
This commit is contained in:
Steven Edwards 2004-02-25 23:54:13 +00:00
parent 6645e904c7
commit 23cc7e88c1
4 changed files with 75 additions and 9 deletions

View file

@ -1,4 +1,4 @@
; $Id: advapi32.def,v 1.13 2004/02/25 23:12:38 sedwards Exp $
; $Id: advapi32.def,v 1.14 2004/02/25 23:54:12 sedwards Exp $
;
; advapi32.def
;
@ -136,7 +136,7 @@ GetCurrentHwProfileA@4
;GetExplicitAccessRightsW
;GetExplicitEntriesFromAclA@12
;GetExplicitEntriesFromAclW@12
;GetFileSecurityA@20
GetFileSecurityA@20
;GetFileSecurityW@20
GetKernelObjectSecurity@20
GetLengthSid@4
@ -169,7 +169,7 @@ GetTokenInformation@20
;GetTrusteeNameW@4
;GetTrusteeTypeA@4
;GetTrusteeTypeW@4
;GetUserNameA@8
GetUserNameA@8
;GetUserNameW@8
;GrantAccessRightsA@16
;GrantAccessRightsW@16
@ -352,6 +352,7 @@ RevertToSelf@0
SetAclInformation@16
;SetEntriesInAclA@16
;SetEntriesInAclW@16
SetFileSecurityA@20
SetKernelObjectSecurity@12
;SetNamedSecurityInfoA@28
;SetNamedSecurityInfoW@28

View file

@ -1,4 +1,4 @@
; $Id: advapi32.edf,v 1.29 2004/02/25 23:12:38 sedwards Exp $
; $Id: advapi32.edf,v 1.30 2004/02/25 23:54:12 sedwards Exp $
;
; advapi32.edf
;
@ -132,7 +132,7 @@ GetCurrentHwProfileA=GetCurrentHwProfileA@4
;GetExplicitAccessRightsW
;GetExplicitEntriesFromAclA=GetExplicitEntriesFromAclA@12
;GetExplicitEntriesFromAclW=GetExplicitEntriesFromAclW@12
;GetFileSecurityA=GetFileSecurityA@20
GetFileSecurityA=GetFileSecurityA@20
;GetFileSecurityW=GetFileSecurityW@20
GetKernelObjectSecurity=GetKernelObjectSecurity@20
GetLengthSid=GetLengthSid@4
@ -165,7 +165,7 @@ GetTokenInformation=GetTokenInformation@20
;GetTrusteeNameW=GetTrusteeNameW@4
;GetTrusteeTypeA=GetTrusteeTypeA@4
;GetTrusteeTypeW=GetTrusteeTypeW@4
;GetUserNameA=GetUserNameA@8
GetUserNameA=GetUserNameA@8
;GetUserNameW=GetUserNameW@8
;GrantAccessRightsA=GrantAccessRightsA@16
;GrantAccessRightsW=GrantAccessRightsW@16
@ -349,7 +349,7 @@ RevertToSelf=RevertToSelf@0
SetAclInformation=SetAclInformation@16
;SetEntriesInAclA=SetEntriesInAclA@16
;SetEntriesInAclW=SetEntriesInAclW@16
;SetFileSecurityA=SetFileSecurityA@12
SetFileSecurityA=SetFileSecurityA@12
;SetFileSecurityW=SetFileSecurityW@12
SetKernelObjectSecurity=SetKernelObjectSecurity@12
;SetNamedSecurityInfoA=SetNamedSecurityInfoA@28

View file

@ -1,4 +1,4 @@
/* $Id: misc.c,v 1.9 2004/02/25 14:25:11 ekohl Exp $
/* $Id: misc.c,v 1.10 2004/02/25 23:54:13 sedwards Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -6,6 +6,7 @@
* PURPOSE: Miscellaneous security functions
*/
#include <debug.h>
#define NTOS_MODE_USER
#include <ntos.h>
#include <windows.h>
@ -144,5 +145,26 @@ RevertToSelf(VOID)
return(TRUE);
}
/******************************************************************************
* GetUserNameA [ADVAPI32.@]
*
* Get the current user name.
*
* PARAMS
* lpszName [O] Destination for the user name.
* lpSize [I/O] Size of lpszName.
*
* RETURNS
* Success: The length of the user name, including terminating NUL.
* Failure: ERROR_MORE_DATA if *lpSize is too small.
*/
BOOL STDCALL
GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
{
DPRINT1("GetUserNameA - Unimplemented\n");
return 1;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: sec.c,v 1.18 2004/02/25 14:25:11 ekohl Exp $
/* $Id: sec.c,v 1.19 2004/02/25 23:54:13 sedwards Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -11,10 +11,41 @@
* Created 01/11/98
*/
#include <debug.h>
#define NTOS_MODE_USER
#include <windows.h>
#include <ntos.h>
/******************************************************************************
* GetFileSecurityA [ADVAPI32.@]
*
* Obtains Specified information about the security of a file or directory.
*
* PARAMS
* lpFileName [I] Name of the file to get info for
* RequestedInformation [I] SE_ flags from "winnt.h"
* pSecurityDescriptor [O] Destination for security information
* nLength [I] Length of pSecurityDescriptor
* lpnLengthNeeded [O] Destination for length of returned security information
*
* RETURNS
* Success: TRUE. pSecurityDescriptor contains the requested information.
* Failure: FALSE. lpnLengthNeeded contains the required space to return the info.
*
* NOTES
* The information returned is constrained by the callers access rights and
* privileges.
*/
BOOL WINAPI
GetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor,
DWORD nLength, LPDWORD lpnLengthNeeded )
{
DPRINT("GetFileSecurityW : stub\n");
return TRUE;
}
/*
* @implemented
@ -289,6 +320,18 @@ MakeSelfRelativeSD (
return TRUE;
}
/******************************************************************************
* SetFileSecurityA [ADVAPI32.@]
* Sets the security of a file or directory
*/
BOOL STDCALL SetFileSecurityA( LPCSTR lpFileName,
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor)
{
DPRINT("SetFileSecurityA : stub\n");
return TRUE;
}
/*
* @implemented