Implemented LookupPrivilegeValueA/W.
This commit is contained in:
parent
40672f99f8
commit
133ba9f3cd
|
@ -148,8 +148,8 @@
|
||||||
@ stdcall LookupAccountSidW(ptr ptr ptr ptr ptr ptr ptr)
|
@ stdcall LookupAccountSidW(ptr ptr ptr ptr ptr ptr ptr)
|
||||||
@ stub LookupPrivilegeDisplayNameA
|
@ stub LookupPrivilegeDisplayNameA
|
||||||
@ stub LookupPrivilegeDisplayNameW
|
@ stub LookupPrivilegeDisplayNameW
|
||||||
@ stub LookupPrivilegeNameA
|
@ stdcall LookupPrivilegeNameA(str ptr ptr long)
|
||||||
@ stub LookupPrivilegeNameW
|
@ stdcall LookupPrivilegeNameW(wstr ptr ptr long)
|
||||||
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
|
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
|
||||||
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
|
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
|
||||||
@ stub MakeAbsoluteSD
|
@ stub MakeAbsoluteSD
|
||||||
|
|
|
@ -757,6 +757,24 @@ BOOL WINAPI IsValidAcl(IN PACL pAcl)
|
||||||
##############################
|
##############################
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static const char * const DefaultPrivNames[] =
|
||||||
|
{
|
||||||
|
NULL, NULL,
|
||||||
|
"SeCreateTokenPrivilege", "SeAssignPrimaryTokenPrivilege",
|
||||||
|
"SeLockMemoryPrivilege", "SeIncreaseQuotaPrivilege",
|
||||||
|
"SeMachineAccountPrivilege", "SeTcbPrivilege",
|
||||||
|
"SeSecurityPrivilege", "SeTakeOwnershipPrivilege",
|
||||||
|
"SeLoadDriverPrivilege", "SeSystemProfilePrivilege",
|
||||||
|
"SeSystemtimePrivilege", "SeProfileSingleProcessPrivilege",
|
||||||
|
"SeIncreaseBasePriorityPrivilege", "SeCreatePagefilePrivilege",
|
||||||
|
"SeCreatePermanentPrivilege", "SeBackupPrivilege",
|
||||||
|
"SeRestorePrivilege", "SeShutdownPrivilege",
|
||||||
|
"SeDebugPrivilege", "SeAuditPrivilege",
|
||||||
|
"SeSystemEnvironmentPrivilege", "SeChangeNotifyPrivilege",
|
||||||
|
"SeRemoteShutdownPrivilege",
|
||||||
|
};
|
||||||
|
#define NUMPRIVS (sizeof DefaultPrivNames/sizeof DefaultPrivNames[0])
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* LookupPrivilegeValueW [ADVAPI32.@]
|
* LookupPrivilegeValueW [ADVAPI32.@]
|
||||||
*
|
*
|
||||||
|
@ -765,12 +783,27 @@ BOOL WINAPI IsValidAcl(IN PACL pAcl)
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid )
|
LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid )
|
||||||
{
|
{
|
||||||
FIXME("(%s,%s,%p): stub\n",debugstr_w(lpSystemName),
|
UINT i;
|
||||||
debugstr_w(lpName), lpLuid);
|
WCHAR priv[0x28];
|
||||||
lpLuid->LowPart = 0x12345678;
|
|
||||||
lpLuid->HighPart = 0x87654321;
|
TRACE("%s,%s,%p\n",debugstr_w(lpSystemName), debugstr_w(lpName), lpLuid);
|
||||||
|
|
||||||
|
for( i=0; i<NUMPRIVS; i++ )
|
||||||
|
{
|
||||||
|
if( !DefaultPrivNames[i] )
|
||||||
|
continue;
|
||||||
|
MultiByteToWideChar( CP_ACP, 0, DefaultPrivNames[i], -1,
|
||||||
|
priv, sizeof priv );
|
||||||
|
if( strcmpW( priv, lpName) )
|
||||||
|
continue;
|
||||||
|
lpLuid->LowPart = i;
|
||||||
|
lpLuid->HighPart = 0;
|
||||||
|
TRACE( "%s -> %08lx-%08lx\n",debugstr_w( lpSystemName ),
|
||||||
|
lpLuid->HighPart, lpLuid->LowPart );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* LookupPrivilegeValueA [ADVAPI32.@]
|
* LookupPrivilegeValueA [ADVAPI32.@]
|
||||||
|
@ -801,6 +834,27 @@ LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* LookupPrivilegeNameA [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI
|
||||||
|
LookupPrivilegeNameA( LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName, LPDWORD cchName)
|
||||||
|
{
|
||||||
|
FIXME("%s %p %p %p\n", debugstr_a(lpSystemName), lpLuid, lpName, cchName);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* LookupPrivilegeNameW [ADVAPI32.@]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI
|
||||||
|
LookupPrivilegeNameW( LPCWSTR lpSystemName, PLUID lpLuid, LPSTR lpName, LPDWORD cchName)
|
||||||
|
{
|
||||||
|
FIXME("%s %p %p %p\n", debugstr_w(lpSystemName), lpLuid, lpName, cchName);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* GetFileSecurityA [ADVAPI32.@]
|
* GetFileSecurityA [ADVAPI32.@]
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue