summaryrefslogtreecommitdiffstats
path: root/src/sssd/LMI_SSSD_utils.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-04-10 10:38:47 +0200
committerPavel Březina <pbrezina@redhat.com>2014-05-09 19:38:30 +0200
commitd17d09110916379b4df5945d03bbe3c8ccae60d9 (patch)
treecd0940fee25855b1134eaf4f66b8cee83fc80399 /src/sssd/LMI_SSSD_utils.c
parentf27b554bfc3dc8f112bc45c1c8c651c8ffec0faf (diff)
downloadopenlmi_sssd-d17d09110916379b4df5945d03bbe3c8ccae60d9.tar.gz
openlmi_sssd-d17d09110916379b4df5945d03bbe3c8ccae60d9.tar.xz
openlmi_sssd-d17d09110916379b4df5945d03bbe3c8ccae60d9.zip
Mock the provider
Diffstat (limited to 'src/sssd/LMI_SSSD_utils.c')
-rw-r--r--src/sssd/LMI_SSSD_utils.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/sssd/LMI_SSSD_utils.c b/src/sssd/LMI_SSSD_utils.c
new file mode 100644
index 0000000..adf77e4
--- /dev/null
+++ b/src/sssd/LMI_SSSD_utils.c
@@ -0,0 +1,63 @@
+/*
+ Authors:
+ Pavel Březina <pbrezina@redhat.com>
+
+ Copyright (C) 2014 Red Hat
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <openlmi/openlmi.h>
+#include "LMI_SSSD_utils.h"
+
+void LMI_SSSDService_Get_Ref(const CMPIBroker *cb,
+ const char *namespace,
+ LMI_SSSDServiceRef *ref)
+{
+ const char *hostname = lmi_get_system_name();
+ const char *sysclass = lmi_get_system_creation_class_name();
+
+ LMI_SSSDServiceRef_Init(ref, cb, namespace);
+ LMI_SSSDServiceRef_Set_Name(ref, SERVICE_NAME);
+ LMI_SSSDServiceRef_Set_SystemName(ref, hostname);
+ LMI_SSSDServiceRef_Set_CreationClassName(ref, LMI_SSSDService_ClassName);
+ LMI_SSSDServiceRef_Set_SystemCreationClassName(ref, sysclass);
+}
+
+void LMI_SSSDResponder_Get_Ref(const CMPIBroker *cb,
+ const char *namespace,
+ const char *name,
+ LMI_SSSDResponderRef *ref)
+{
+ LMI_SSSDResponderRef_Init(ref, cb, namespace);
+ LMI_SSSDResponderRef_Set_Name(ref, name);
+}
+
+void LMI_SSSDDomain_Get_Ref(const CMPIBroker *cb,
+ const char *namespace,
+ const char *name,
+ LMI_SSSDDomainRef *ref)
+{
+ LMI_SSSDDomainRef_Init(ref, cb, namespace);
+ LMI_SSSDDomainRef_Set_Name(ref, name);
+}
+
+void LMI_SSSDSubdomain_Get_Ref(const CMPIBroker *cb,
+ const char *namespace,
+ const char *name,
+ LMI_SSSDSubdomainRef *ref)
+{
+ LMI_SSSDSubdomainRef_Init(ref, cb, namespace);
+ LMI_SSSDSubdomainRef_Set_Name(ref, name);
+}