diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index a7a25f70ab7..772a26557b0 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -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 diff --git a/reactos/lib/advapi32/advapi32.edf b/reactos/lib/advapi32/advapi32.edf index 308896e352a..221b0efc3e7 100644 --- a/reactos/lib/advapi32/advapi32.edf +++ b/reactos/lib/advapi32/advapi32.edf @@ -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 diff --git a/reactos/lib/advapi32/sec/misc.c b/reactos/lib/advapi32/sec/misc.c index 9ea41e8981d..6f7b1f7eed6 100644 --- a/reactos/lib/advapi32/sec/misc.c +++ b/reactos/lib/advapi32/sec/misc.c @@ -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 #define NTOS_MODE_USER #include #include @@ -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 */ diff --git a/reactos/lib/advapi32/sec/sec.c b/reactos/lib/advapi32/sec/sec.c index daffaa352ae..7937b602e5f 100644 --- a/reactos/lib/advapi32/sec/sec.c +++ b/reactos/lib/advapi32/sec/sec.c @@ -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 #define NTOS_MODE_USER #include #include +/****************************************************************************** + * 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