⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 securitypropertyowner.cpp

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 CPP
📖 第 1 页 / 共 3 页
字号:
                     properties[i].propertyName, "crlStore"))        {            _crlStore->propertyName = properties[i].propertyName;            _crlStore->defaultValue = properties[i].defaultValue;            _crlStore->currentValue = properties[i].defaultValue;            _crlStore->plannedValue = properties[i].defaultValue;            _crlStore->dynamic = properties[i].dynamic;            _crlStore->domain = properties[i].domain;            _crlStore->domainSize = properties[i].domainSize;            _crlStore->externallyVisible = properties[i].externallyVisible;        }#endif        else if (String::equalNoCase(            properties[i].propertyName, "sslClientVerificationMode"))        {            _sslClientVerificationMode->propertyName =                properties[i].propertyName;            _sslClientVerificationMode->defaultValue =                properties[i].defaultValue;            _sslClientVerificationMode->currentValue =                properties[i].defaultValue;            _sslClientVerificationMode->plannedValue =                properties[i].defaultValue;            _sslClientVerificationMode->dynamic = properties[i].dynamic;            _sslClientVerificationMode->domain = properties[i].domain;            _sslClientVerificationMode->domainSize = properties[i].domainSize;            _sslClientVerificationMode->externallyVisible =                properties[i].externallyVisible;        }        else if (String::equalNoCase(            properties[i].propertyName, "sslTrustStoreUserName"))        {            _sslTrustStoreUserName->propertyName = properties[i].propertyName;            _sslTrustStoreUserName->defaultValue = properties[i].defaultValue;            _sslTrustStoreUserName->currentValue = properties[i].defaultValue;            _sslTrustStoreUserName->plannedValue = properties[i].defaultValue;            _sslTrustStoreUserName->dynamic = properties[i].dynamic;            _sslTrustStoreUserName->domain = properties[i].domain;            _sslTrustStoreUserName->domainSize = properties[i].domainSize;            _sslTrustStoreUserName->externallyVisible =                properties[i].externallyVisible;        }        else if (String::equalNoCase(            properties[i].propertyName, "enableRemotePrivilegedUserAccess"))        {            _enableRemotePrivilegedUserAccess->propertyName =                properties[i].propertyName;            _enableRemotePrivilegedUserAccess->defaultValue =                properties[i].defaultValue;            _enableRemotePrivilegedUserAccess->currentValue =                properties[i].defaultValue;            _enableRemotePrivilegedUserAccess->plannedValue =                properties[i].defaultValue;            _enableRemotePrivilegedUserAccess->dynamic = properties[i].dynamic;            _enableRemotePrivilegedUserAccess->domain = properties[i].domain;            _enableRemotePrivilegedUserAccess->domainSize =                properties[i].domainSize;            _enableRemotePrivilegedUserAccess->externallyVisible =                properties[i].externallyVisible;        }        else if (String::equalNoCase(properties[i].propertyName,                     "enableSubscriptionsForNonprivilegedUsers"))        {            _enableSubscriptionsForNonprivilegedUsers->propertyName =                properties[i].propertyName;            _enableSubscriptionsForNonprivilegedUsers->defaultValue =                properties[i].defaultValue;            _enableSubscriptionsForNonprivilegedUsers->currentValue =                properties[i].defaultValue;            _enableSubscriptionsForNonprivilegedUsers->plannedValue =                properties[i].defaultValue;            _enableSubscriptionsForNonprivilegedUsers->dynamic =                properties[i].dynamic;            _enableSubscriptionsForNonprivilegedUsers->domain =                properties[i].domain;            _enableSubscriptionsForNonprivilegedUsers->domainSize =                properties[i].domainSize;            _enableSubscriptionsForNonprivilegedUsers->externallyVisible =                properties[i].externallyVisible;        }#ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION        else if (String::equalNoCase(                     properties[i].propertyName, "authorizedUserGroups"))        {            _authorizedUserGroups->propertyName = properties[i].propertyName;            _authorizedUserGroups->defaultValue = properties[i].defaultValue;            _authorizedUserGroups->currentValue = properties[i].defaultValue;            _authorizedUserGroups->plannedValue = properties[i].defaultValue;            _authorizedUserGroups->dynamic = properties[i].dynamic;            _authorizedUserGroups->domain = properties[i].domain;            _authorizedUserGroups->domainSize = properties[i].domainSize;            _authorizedUserGroups->externallyVisible =                properties[i].externallyVisible;        }#endif#ifdef PEGASUS_KERBEROS_AUTHENTICATION        else if (String::equalNoCase(                     properties[i].propertyName, "kerberosServiceName"))        {            _kerberosServiceName->propertyName = properties[i].propertyName;            _kerberosServiceName->defaultValue = properties[i].defaultValue;            _kerberosServiceName->currentValue = properties[i].defaultValue;            _kerberosServiceName->plannedValue = properties[i].defaultValue;            _kerberosServiceName->dynamic = properties[i].dynamic;            _kerberosServiceName->domain = properties[i].domain;            _kerberosServiceName->domainSize = properties[i].domainSize;            _kerberosServiceName->externallyVisible =                properties[i].externallyVisible;        }#endif    }}struct ConfigProperty* SecurityPropertyOwner::_lookupConfigProperty(    const String& name) const{    if (String::equalNoCase(_enableAuthentication->propertyName, name))    {        return _enableAuthentication.get();    }    else if (String::equalNoCase(                 _enableNamespaceAuthorization->propertyName, name))    {        return _enableNamespaceAuthorization.get();    }    else if (String::equalNoCase(_httpAuthType->propertyName, name))    {        return _httpAuthType.get();    }    else if (String::equalNoCase(_passwordFilePath->propertyName, name))    {        return _passwordFilePath.get();    }    else if (String::equalNoCase(_certificateFilePath->propertyName, name))    {        return _certificateFilePath.get();    }    else if (String::equalNoCase(_keyFilePath->propertyName, name))    {        return _keyFilePath.get();    }    else if (String::equalNoCase(_trustStore->propertyName, name))    {        return _trustStore.get();    }#ifdef PEGASUS_ENABLE_SSL_CRL_VERIFICATION    else if (String::equalNoCase(_crlStore->propertyName, name))    {        return _crlStore.get();    }#endif    else if (String::equalNoCase(                 _sslClientVerificationMode->propertyName, name))    {        return _sslClientVerificationMode.get();    }    else if (String::equalNoCase(                 _sslTrustStoreUserName->propertyName, name))    {        return _sslTrustStoreUserName.get();    }    else if (String::equalNoCase(                 _enableRemotePrivilegedUserAccess->propertyName, name))    {        return _enableRemotePrivilegedUserAccess.get();    }    else if (String::equalNoCase(                 _enableSubscriptionsForNonprivilegedUsers->propertyName, name))    {        return _enableSubscriptionsForNonprivilegedUsers.get();    }#ifdef PEGASUS_ENABLE_USERGROUP_AUTHORIZATION    else if (String::equalNoCase(_authorizedUserGroups->propertyName, name))    {        return _authorizedUserGroups.get();    }#endif#ifdef PEGASUS_KERBEROS_AUTHENTICATION    else if (String::equalNoCase(_kerberosServiceName->propertyName, name))    {        return _kerberosServiceName.get();    }#endif    else    {        throw UnrecognizedConfigProperty(name);    }}/**    Get information about the specified property.*/void SecurityPropertyOwner::getPropertyInfo(    const String& name,    Array<String>& propertyInfo) const{    propertyInfo.clear();    struct ConfigProperty * configProperty = _lookupConfigProperty(name);    propertyInfo.append(configProperty->propertyName);    propertyInfo.append(configProperty->defaultValue);    propertyInfo.append(configProperty->currentValue);    propertyInfo.append(configProperty->plannedValue);    if (configProperty->dynamic)    {        propertyInfo.append(STRING_TRUE);    }    else    {        propertyInfo.append(STRING_FALSE);    }    if (configProperty->externallyVisible)    {        propertyInfo.append(STRING_TRUE);    }    else    {        propertyInfo.append(STRING_FALSE);    }}/**    Get default value of the specified property.*/String SecurityPropertyOwner::getDefaultValue(const String& name) const{    struct ConfigProperty * configProperty = _lookupConfigProperty(name);    return configProperty->defaultValue;}/**    Get current value of the specified property.*/String SecurityPropertyOwner::getCurrentValue(const String& name) const{    struct ConfigProperty * configProperty = _lookupConfigProperty(name);    return configProperty->currentValue;}/**    Get planned value of the specified property.*/String SecurityPropertyOwner::getPlannedValue(const String& name) const{    struct ConfigProperty * configProperty = _lookupConfigProperty(name);    return configProperty->plannedValue;}/**    Init current value of the specified property to the specified value.*/void SecurityPropertyOwner::initCurrentValue(    const String& name,    const String& value){    struct ConfigProperty* configProperty = _lookupConfigProperty(name);    configProperty->currentValue = value;}/**    Init planned value of the specified property to the specified value.*/void SecurityPropertyOwner::initPlannedValue(    const String& name,    const String& value){    struct ConfigProperty* configProperty = _lookupConfigProperty(name);    configProperty->plannedValue = value;}/**    Update current value of the specified property to the specified value.*/void SecurityPropertyOwner::updateCurrentValue(    const String& name,    const String& value){    //    // make sure the property is dynamic before updating the value.    //    if (!isDynamic(name))    {        throw NonDynamicConfigProperty(name);    }    struct ConfigProperty* configProperty = _lookupConfigProperty(name);    configProperty->currentValue = value;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -