diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-05-08 12:12:50 +0200 |
---|---|---|
committer | Pavel Březina <pbrezina@redhat.com> | 2014-05-09 19:38:43 +0200 |
commit | ee6c9177f161239f4420f5679001330e477061ec (patch) | |
tree | 77f632ce0979c0c6adc081af0ee21960f58b54d1 /src/sssd/LMI_SSSDAvailableDomainProvider.c | |
parent | ff512c60dd0fce3a9b6ad76deb0230f7bac37696 (diff) | |
download | openlmi_sssd-ee6c9177f161239f4420f5679001330e477061ec.tar.gz openlmi_sssd-ee6c9177f161239f4420f5679001330e477061ec.tar.xz openlmi_sssd-ee6c9177f161239f4420f5679001330e477061ec.zip |
Generate skeleton from MOF
Diffstat (limited to 'src/sssd/LMI_SSSDAvailableDomainProvider.c')
-rw-r--r-- | src/sssd/LMI_SSSDAvailableDomainProvider.c | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/src/sssd/LMI_SSSDAvailableDomainProvider.c b/src/sssd/LMI_SSSDAvailableDomainProvider.c index 3beaa3a..bba3f6d 100644 --- a/src/sssd/LMI_SSSDAvailableDomainProvider.c +++ b/src/sssd/LMI_SSSDAvailableDomainProvider.c @@ -1,32 +1,10 @@ -/* - 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 <konkret/konkret.h> #include "LMI_SSSDAvailableDomain.h" -#include "LMI_SSSD_utils.h" static const CMPIBroker* _cb; -static void LMI_SSSDAvailableDomainInitialize(const CMPIContext *ctx) +static void LMI_SSSDAvailableDomainInitialize() { - lmi_init(PROVIDER_NAME, _cb, ctx, NULL); } static CMPIStatus LMI_SSSDAvailableDomainCleanup( @@ -54,25 +32,6 @@ static CMPIStatus LMI_SSSDAvailableDomainEnumInstances( const CMPIObjectPath* cop, const char** properties) { - LMI_SSSDServiceRef lmi_sssd; - LMI_SSSDDomainRef lmi_domain; - LMI_SSSDAvailableDomain association; - const char *namespace = KNameSpace(cop); - const char *domains[] = {"ldap.pb", "ad.pb", "ipa.pb", NULL}; - int i; - - LMI_SSSDService_Get_Ref(_cb, namespace, &lmi_sssd); - - for (i = 0; domains[i] != NULL; i++) { - LMI_SSSDDomain_Get_Ref(_cb, namespace, domains[i], &lmi_domain); - - LMI_SSSDAvailableDomain_Init(&association, _cb, namespace); - LMI_SSSDAvailableDomain_Set_SSSD(&association, &lmi_sssd); - LMI_SSSDAvailableDomain_Set_Domain(&association, &lmi_domain); - - KReturnInstance(cr, association); - } - CMReturn(CMPI_RC_OK); } @@ -228,13 +187,13 @@ CMInstanceMIStub( LMI_SSSDAvailableDomain, LMI_SSSDAvailableDomain, _cb, - LMI_SSSDAvailableDomainInitialize(ctx)) + LMI_SSSDAvailableDomainInitialize()) CMAssociationMIStub( LMI_SSSDAvailableDomain, LMI_SSSDAvailableDomain, _cb, - LMI_SSSDAvailableDomainInitialize(ctx)) + LMI_SSSDAvailableDomainInitialize()) KONKRET_REGISTRATION( "root/cimv2", |