summaryrefslogtreecommitdiffstats
path: root/src/sssd/LMI_HostedSSSDServiceProvider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sssd/LMI_HostedSSSDServiceProvider.c')
-rw-r--r--src/sssd/LMI_HostedSSSDServiceProvider.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/sssd/LMI_HostedSSSDServiceProvider.c b/src/sssd/LMI_HostedSSSDServiceProvider.c
index 918a226..23284d3 100644
--- a/src/sssd/LMI_HostedSSSDServiceProvider.c
+++ b/src/sssd/LMI_HostedSSSDServiceProvider.c
@@ -1,10 +1,12 @@
#include <konkret/konkret.h>
#include "LMI_HostedSSSDService.h"
+#include "utils.h"
static const CMPIBroker* _cb;
-static void LMI_HostedSSSDServiceInitialize()
+static void LMI_HostedSSSDServiceInitialize(const CMPIContext *ctx)
{
+ lmi_init(PROVIDER_NAME, _cb, ctx, NULL);
}
static CMPIStatus LMI_HostedSSSDServiceCleanup(
@@ -32,6 +34,19 @@ static CMPIStatus LMI_HostedSSSDServiceEnumInstances(
const CMPIObjectPath* cop,
const char** properties)
{
+ LMI_SSSDServiceRef ref;
+ LMI_HostedSSSDService association;
+ const char *namespace = KNameSpace(cop);
+
+ LMI_SSSDService_Get_Ref(_cb, namespace, &ref);
+
+ LMI_HostedSSSDService_Init(&association, _cb, namespace);
+ LMI_HostedSSSDService_Set_Dependent(&association, &ref);
+ LMI_HostedSSSDService_SetObjectPath_Antecedent(&association,
+ lmi_get_computer_system());
+
+ KReturnInstance(cr, association);
+
CMReturn(CMPI_RC_OK);
}
@@ -187,13 +202,13 @@ CMInstanceMIStub(
LMI_HostedSSSDService,
LMI_HostedSSSDService,
_cb,
- LMI_HostedSSSDServiceInitialize())
+ LMI_HostedSSSDServiceInitialize(ctx))
CMAssociationMIStub(
LMI_HostedSSSDService,
LMI_HostedSSSDService,
_cb,
- LMI_HostedSSSDServiceInitialize())
+ LMI_HostedSSSDServiceInitialize(ctx))
KONKRET_REGISTRATION(
"root/cimv2",