2025-04-27 07:49:33 -04:00

165 lines
7.3 KiB
Plaintext

// **************************************************************************
// Copyright (c) 1998-2001 Microsoft Corporation.
//
// File: Methprov.mof
//
// Description:
//
// History:
//
// **************************************************************************
/////////////////////////////////////////////////////////////////////
// Register the provider.
instance of __Win32Provider as $P
{
Name = "TestProv" ;
ClsId = "{AF9BA8DF-E159-11d2-B340-00104BCC4B4A}" ;
PerUserInitialization = true;
};
instance of __MethodProviderRegistration
{
Provider = $P;
};
/////////////////////////////////////////////////////////////////////
//
// Declare a class whose methods are executed by the sample provider.
[dynamic: ToInstance, provider("testprov")]class TestProv
{
// used for loop back testing
[implemented, static]
void DoNothing();
// this method returns the name passed to the providers initialize function and the
// name of the user during impersonation
[implemented, static]
uint32 GetUserName([out] string sInitialUser, [out] string sImpersonateUser);
// This gets the access rights on the pointer handed to us during the initialize function
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnInitialPtr([out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via OpenNamespace which was called while
// impersonating. This whole method doesnt work on 9X.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnImpOpenNamespacePtr([in]string Name = "DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via OpenNamespace which was called while
// not impersonating.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnNonImpOpenNamespacePtr([in] string Name = "DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via Unauthenticated login which was called while
// impersonating. This whole method doesnt work on 9X.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnImpUnauthenicatedPtr([in] string Name = "ROOT\\DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via Unauthenticated which was called while
// not impersonating.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnNonImpUnauthenicatedPtr([in] string Name = "ROOT\\DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via Authenticated login which was called while
// impersonating. This whole method doesnt work on 9X.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnImpAuthenicatedPtr([in] string Name = "ROOT\\DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
// This gets the access rights on the pointer retrived via Authenticated which was called while
// not impersonating.
// The tested access is determined by trying things, while the dwCheckedAccess is determined
// by calling the security object's __systemsecurity::GetCallerRights Method. The non
// impersonated values are determined when running as admin while the impersonated is determined
// while running as the user. Note that impersonated only counts for nt.
[implemented, static]
uint32 GetRightsOnNonImpAuthenicatedPtr([in] string Name = "ROOT\\DEFAULT",
[out] uint32 dwNonImpTestedAccess, [out] uint32 dwNonImpCheckedAccess,
[out] uint32 dwImpTestedAccess, [out] uint32 dwImpCheckedAccess);
};
instance of __InstanceProviderRegistration
{
Provider = $P;
SupportsPut = TRUE;
SupportsGet = TRUE;
SupportsDelete = FALSE;
SupportsEnumeration = TRUE;
};
/////////////////////////////////////////////////////////////////////
//
// Declare a class whose dynamic instances are provided by the
// sample provider.
[dynamic, provider("testprov")]
class TestProvDynamic
{
[key]
String MyKey="HELLO";
[PropertyContext("Name")]
uint32 MyValue;
};
class TestProvStatic
{
[key] sint32 MyKey;
};