00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_CONFIGOPTS_HPP_INCLUDE_GUARD_
00036 #define OW_CONFIGOPTS_HPP_INCLUDE_GUARD_
00037 #include "OW_config.h"
00038 #include "OW_Types.hpp"
00039
00040 #ifndef OW_DEFAULT_DEBUGFLAG
00041 #define OW_DEFAULT_DEBUGFLAG "false"
00042 #endif
00043 #ifndef OW_DEFAULT_HTTP_SERVER_HTTP_PORT
00044 #define OW_DEFAULT_HTTP_SERVER_HTTP_PORT "5988"
00045 #endif
00046 #ifndef OW_DEFAULT_HTTP_SERVER_HTTPS_PORT
00047 #define OW_DEFAULT_HTTP_SERVER_HTTPS_PORT "5989"
00048 #endif
00049 #ifndef OW_DEFAULT_LOG_LOCATION
00050 #define OW_DEFAULT_LOG_LOCATION "syslog"
00051 #endif
00052 #ifndef OW_DEFAULT_LOG_LEVEL
00053 #define OW_DEFAULT_LOG_LEVEL "error"
00054 #endif
00055
00056 #ifndef OW_DEFAULT_OWLIB_DIR
00057 #define OW_DEFAULT_OWLIB_DIR OW_DEFAULT_LIB_DIR"/openwbem"
00058 #endif
00059 #ifndef OW_DEFAULT_OWLIBDIR
00060 #define OW_DEFAULT_OWLIBDIR OW_DEFAULT_LIB_DIR"/openwbem"
00061 #endif
00062 #ifndef OW_DEFAULT_PROVIDER_IFC_LIBS
00063 #define OW_DEFAULT_PROVIDER_IFC_LIBS OW_DEFAULT_OWLIBDIR"/provifcs"
00064 #endif
00065 #ifndef OW_DEFAULT_SERVICES_PATH
00066 #define OW_DEFAULT_SERVICES_PATH OW_DEFAULT_OWLIBDIR"/services"
00067 #endif
00068 #ifndef OW_DEFAULT_REQUEST_HANDLER_PATH
00069 #define OW_DEFAULT_REQUEST_HANDLER_PATH OW_DEFAULT_OWLIBDIR"/requesthandlers"
00070 #endif
00071 #ifndef OW_DEFAULT_CPPPROVIFC_PROV_LOCATION
00072 #define OW_DEFAULT_CPPPROVIFC_PROV_LOCATION OW_DEFAULT_OWLIBDIR"/c++providers"
00073 #endif
00074 #ifndef OW_DEFAULT_NPIPROVIFC_PROV_LOCATION
00075 #define OW_DEFAULT_NPIPROVIFC_PROV_LOCATION OW_DEFAULT_OWLIBDIR"/npiproviders"
00076 #endif
00077 #ifndef OW_DEFAULT_CMPIPROVIFC_PROV_LOCATION
00078 #define OW_DEFAULT_CMPIPROVIFC_PROV_LOCATION OW_DEFAULT_OWLIBDIR"/cmpiproviders"
00079 #endif
00080 #ifndef OW_DEFAULT_PERLPROVIFC_PROV_LOCATION
00081 #define OW_DEFAULT_PERLPROVIFC_PROV_LOCATION OW_DEFAULT_OWLIBDIR"/perlproviders"
00082 #endif
00083 #ifndef OW_DEFAULT_AUTHENTICATION_MODULE
00084 #define OW_DEFAULT_AUTHENTICATION_MODULE OW_DEFAULT_OWLIBDIR"/authentication/libpamauthentication"OW_SHAREDLIB_EXTENSION
00085 #endif
00086 #ifndef OW_DEFAULT_CONFIG_FILE
00087 #define OW_DEFAULT_CONFIG_FILE OW_DEFAULT_SYSCONF_DIR"/openwbem/openwbem.conf"
00088 #endif
00089 #ifndef OW_DEFAULT_HTTP_SERVER_DIGEST_PASSWORD_FILE
00090 #define OW_DEFAULT_HTTP_SERVER_DIGEST_PASSWORD_FILE OW_DEFAULT_SYSCONF_DIR"/openwbem/digest_auth.passwd"
00091 #endif
00092 #ifndef OW_DEFAULT_SIMPLE_AUTH_PASSWORD_FILE
00093 #define OW_DEFAULT_SIMPLE_AUTH_PASSWORD_FILE OW_DEFAULT_SYSCONF_DIR"/openwbem/simple_auth.passwd"
00094 #endif
00095
00096 #ifndef OW_DEFAULT_DATA_DIR
00097 #define OW_DEFAULT_DATA_DIR OW_DEFAULT_STATE_DIR"/lib/openwbem"
00098 #endif
00099 #ifndef OW_DEFAULT_DATADIR
00100 #define OW_DEFAULT_DATADIR OW_DEFAULT_STATE_DIR"/lib/openwbem"
00101 #endif
00102 #ifndef OW_DEFAULT_OWLIBEXECDIR
00103 #define OW_DEFAULT_OWLIBEXECDIR OW_DEFAULT_LIBEXEC_DIR"/openwbem"
00104 #endif
00105 #ifndef OW_DEFAULT_ALLOW_ANONYMOUS
00106 #define OW_DEFAULT_ALLOW_ANONYMOUS "false"
00107 #endif
00108 #ifndef OW_DEFAULT_HTTP_SERVER_MAX_CONNECTIONS
00109 #define OW_DEFAULT_HTTP_SERVER_MAX_CONNECTIONS "30"
00110 #endif
00111 #ifndef OW_DEFAULT_DISABLE_INDICATIONS
00112 #define OW_DEFAULT_DISABLE_INDICATIONS "false"
00113 #endif
00114 #ifndef OW_DEFAULT_WQL_LIB
00115 #define OW_DEFAULT_WQL_LIB OW_DEFAULT_LIB_DIR"/libowwql"OW_SHAREDLIB_EXTENSION
00116 #endif
00117 #ifndef OW_DEFAULT_HTTP_SERVER_ENABLE_DEFLATE
00118 #define OW_DEFAULT_HTTP_SERVER_ENABLE_DEFLATE "true"
00119 #endif
00120 #ifndef OW_DEFAULT_HTTP_SERVER_USE_UDS
00121 #define OW_DEFAULT_HTTP_SERVER_USE_UDS "true"
00122 #endif
00123 #ifndef OW_DEFAULT_CPPPROVIFC_PROV_TTL
00124 #define OW_DEFAULT_CPPPROVIFC_PROV_TTL "5"
00125 #endif
00126 #ifndef OW_DEFAULT_CMPIPROVIFC_PROV_TTL
00127 #define OW_DEFAULT_CMPIPROVIFC_PROV_TTL "-1"
00128 #endif
00129 #ifndef OW_DEFAULT_REQUEST_HANDLER_TTL
00130 #define OW_DEFAULT_REQUEST_HANDLER_TTL "5"
00131 #endif
00132 #ifndef OW_DEFAULT_MAX_CLASS_CACHE_SIZE_I
00133 #define OW_DEFAULT_MAX_CLASS_CACHE_SIZE_I 128
00134 #endif
00135 #ifndef OW_DEFAULT_MAX_CLASS_CACHE_SIZE
00136 #define OW_DEFAULT_MAX_CLASS_CACHE_SIZE "128"
00137 #endif
00138 #ifndef OW_DEFAULT_CHECK_REFERENTIAL_INTEGRITY
00139 #define OW_DEFAULT_CHECK_REFERENTIAL_INTEGRITY "false"
00140 #endif
00141 #ifndef OW_DEFAULT_HTTP_SERVER_SINGLE_THREAD
00142 #define OW_DEFAULT_HTTP_SERVER_SINGLE_THREAD "false"
00143 #endif
00144 #ifndef OW_DEFAULT_HTTP_SERVER_USE_DIGEST
00145 #define OW_DEFAULT_HTTP_SERVER_USE_DIGEST "true"
00146 #endif
00147 #ifndef OW_DEFAULT_POLLING_MANAGER_MAX_THREADS
00148 #define OW_DEFAULT_POLLING_MANAGER_MAX_THREADS "256"
00149 #endif
00150 #ifndef OW_DEFAULT_HTTP_SERVER_TIMEOUT
00151 #define OW_DEFAULT_HTTP_SERVER_TIMEOUT "300"
00152 #endif
00153 #ifndef OW_DEFAULT_MAX_INDICATION_EXPORT_THREADS
00154 #define OW_DEFAULT_MAX_INDICATION_EXPORT_THREADS "30"
00155 #endif
00156 #ifndef OW_DEFAULT_RESTART_ON_ERROR
00157 #define OW_DEFAULT_RESTART_ON_ERROR "true"
00158 #endif
00159 #ifndef OW_DEFAULT_HTTP_SERVER_LISTEN_ADDRESSES
00160 #define OW_DEFAULT_HTTP_SERVER_LISTEN_ADDRESSES "0.0.0.0"
00161 #endif
00162 #ifndef OW_DEFAULT_SLP_ENABLE_ADVERTISEMENT
00163 #define OW_DEFAULT_SLP_ENABLE_ADVERTISEMENT "true"
00164 #endif
00165 #ifndef OW_DEFAULT_INTEROP_SCHEMA_NAMESPACE
00166 #define OW_DEFAULT_INTEROP_SCHEMA_NAMESPACE "root"
00167 #endif
00168 #ifndef OW_DEFAULT_HTTP_SERVER_UDS_FILENAME
00169 #define OW_DEFAULT_HTTP_SERVER_UDS_FILENAME "/tmp/OW@LCL@APIIPC_72859_Xq47Bf_P9r761-5_J-7_Q"OW_PACKAGE_PREFIX
00170 #endif
00171 #ifndef OW_DEFAULT_ALLOW_LOCAL_AUTHENTICATION
00172 #define OW_DEFAULT_ALLOW_LOCAL_AUTHENTICATION "false"
00173 #endif
00174 #ifndef OW_DEFAULT_REMOTEPROVIFC_MAX_CONNECTIONS_PER_URL
00175 #define OW_DEFAULT_REMOTEPROVIFC_MAX_CONNECTIONS_PER_URL "5"
00176 #endif
00177 #ifndef OW_DEFAULT_ALLOWED_USERS
00178 #define OW_DEFAULT_ALLOWED_USERS "*"
00179 #endif
00180 #ifndef OW_DEFAULT_HTTP_SERVER_DEFAULT_CONTENT_LANGUAGE
00181 #define OW_DEFAULT_HTTP_SERVER_DEFAULT_CONTENT_LANGUAGE "en"
00182 #endif
00183 #ifndef OW_DEFAULT_HTTP_SERVER_SSL_CLIENT_VERIFICATION
00184 #define OW_DEFAULT_HTTP_SERVER_SSL_CLIENT_VERIFICATION "disabled"
00185 #endif
00186 #ifndef OW_DEFAULT_HTTP_SERVER_SSL_TRUST_STORE
00187 #define OW_DEFAULT_HTTP_SERVER_SSL_TRUST_STORE OW_DEFAULT_SYSCONF_DIR"/openwbem/truststore"
00188 #endif
00189 #ifndef OW_DEFAULT_LOG_1_TYPE
00190 #define OW_DEFAULT_LOG_1_TYPE "syslog"
00191 #endif
00192 #ifndef OW_DEFAULT_LOG_1_COMPONENTS
00193 #define OW_DEFAULT_LOG_1_COMPONENTS "*"
00194 #endif
00195 #ifndef OW_DEFAULT_LOG_1_LEVEL
00196 #define OW_DEFAULT_LOG_1_LEVEL "error"
00197 #endif
00198 #ifndef OW_DEFAULT_LOG_1_FORMAT
00199 #define OW_DEFAULT_LOG_1_FORMAT "[%t]%m"
00200 #endif
00201 #ifndef OW_DEFAULT_LOG_1_MAX_FILE_SIZE
00202 #define OW_DEFAULT_LOG_1_MAX_FILE_SIZE "0"
00203 #endif
00204 #ifndef OW_DEFAULT_LOG_1_MAX_BACKUP_INDEX
00205 #define OW_DEFAULT_LOG_1_MAX_BACKUP_INDEX "1"
00206 #endif
00207 #ifndef OW_DEFAULT_LOG_1_FLUSH
00208 #define OW_DEFAULT_LOG_1_FLUSH "true"
00209 #endif
00210 #ifndef OW_DEFAULT_DISABLE_CPP_PROVIDER_INTERFACE
00211 #define OW_DEFAULT_DISABLE_CPP_PROVIDER_INTERFACE "false"
00212 #endif
00213 #ifndef OW_DEFAULT_HTTP_SERVER_ALLOW_LOCAL_AUTHENTICATION
00214 #define OW_DEFAULT_HTTP_SERVER_ALLOW_LOCAL_AUTHENTICATION "false"
00215 #endif
00216 #ifndef OW_DEFAULT_HTTP_SERVER_REUSE_ADDR
00217 #define OW_DEFAULT_HTTP_SERVER_REUSE_ADDR "true"
00218 #endif
00219 #ifndef OW_DEFAULT_OWBI1IFC_PROV_LOCATION
00220 #define OW_DEFAULT_OWBI1IFC_PROV_LOCATION OW_DEFAULT_OWLIBDIR"/owbi1providers"
00221 #endif
00222 #ifndef OW_DEFAULT_OWBI1IFC_PROV_TTL
00223 #define OW_DEFAULT_OWBI1IFC_PROV_TTL "5"
00224 #endif
00225 #ifndef OW_DEFAULT_PIDFILE
00226 #define OW_DEFAULT_PIDFILE OW_PIDFILE_DIR "/" OW_PACKAGE_PREFIX "owcimomd.pid"
00227 #endif
00228 #ifndef OW_DEFAULT_DROP_ROOT_PRIVILEGES
00229 #define OW_DEFAULT_DROP_ROOT_PRIVILEGES "false"
00230 #endif
00231 #ifndef OW_DEFAULT_ADDITIONAL_CONFIG_FILES_DIRS
00232 #define OW_DEFAULT_ADDITIONAL_CONFIG_FILES_DIRS OW_DEFAULT_SYSCONF_DIR"/openwbem/openwbem.conf.d"
00233 #endif
00234
00235
00236 namespace OW_NAMESPACE
00237 {
00238 namespace ConfigOpts
00239 {
00240
00241
00242
00243 static const char* const DEBUGFLAG_opt = "owcimomd.debugflag";
00244 static const char* const CONFIG_FILE_opt = "owcimomd.config_file";
00245 static const char* const LOG_LOCATION_opt = "owcimomd.log_location";
00246 static const char* const LOG_LEVEL_opt = "owcimomd.log_level";
00247 static const char* const PROVIDER_IFC_LIBS_opt = "owcimomd.provider_ifc_libs";
00248 static const char* const ONLYHELP_opt = "owcimomd.onlyhelp";
00249 static const char* const LIBEXECDIR_opt = "owcimomd.libexecdir";
00250 static const char* const OWLIBDIR_opt = "owcimomd.owlibdir";
00251 static const char* const DATADIR_opt = "owcimomd.datadir";
00252 static const char* const ALLOW_ANONYMOUS_opt = "owcimomd.allow_anonymous";
00253 static const char* const PAM_ALLOWED_USERS_opt = "pam.allowed_users";
00254 static const char* const SIMPLE_AUTH_PASSWORD_FILE_opt = "simple_auth.password_file";
00255 static const char* const AUTHENTICATION_MODULE_opt = "owcimomd.authentication_module";
00256 static const char* const DUMP_SOCKET_IO_opt = "owcimomd.dump_socket_io";
00257 static const char* const CPPPROVIFC_PROV_LOCATION_opt = "cppprovifc.prov_location";
00258 static const char* const DISABLE_INDICATIONS_opt = "owcimomd.disable_indications";
00259 static const char* const WQL_LIB_opt = "owcimomd.wql_lib";
00260 static const char* const ACL_SUPERUSER_opt = "owcimomd.ACL_superuser";
00261
00262 static const char* const SERVICES_PATH_opt = "owcimomd.services_path";
00263 static const char* const REQUEST_HANDLER_PATH_opt = "owcimomd.request_handler_path";
00264 static const char* const SLP_ENABLE_ADVERTISEMENT_opt = "slp.enable_advertisement";
00265 static const char* const HTTP_SERVER_USE_UDS_opt = "http_server.use_UDS";
00266 static const char* const NPIPROVIFC_PROV_LOCATION_opt = "npiprovifc.prov_location";
00267 static const char* const HTTP_SERVER_SINGLE_THREAD_opt = "http_server.single_thread";
00268 static const char* const HTTP_SERVER_HTTP_PORT_opt = "http_server.http_port";
00269 static const char* const HTTP_SERVER_HTTPS_PORT_opt = "http_server.https_port";
00270 static const char* const HTTP_SERVER_ENABLE_DEFLATE_opt = "http_server.enable_deflate";
00271 static const char* const HTTP_SERVER_USE_DIGEST_opt = "http_server.use_digest";
00272 #ifndef OW_DISABLE_DIGEST
00273 static const char* const HTTP_SERVER_DIGEST_PASSWORD_FILE_opt = "http_server.digest_password_file";
00274 #endif
00275 static const char* const HTTP_SERVER_MAX_CONNECTIONS_opt = "http_server.max_connections";
00276 static const char* const HTTP_SERVER_SSL_CERT_opt = "http_server.SSL_cert";
00277 static const char* const HTTP_SERVER_SSL_KEY_opt = "http_server.SSL_key";
00278 static const char* const CPPPROVIFC_PROV_TTL_opt = "cppprovifc.prov_TTL";
00279 static const char* const REQUEST_HANDLER_TTL_opt = "owcimomd.request_handler_TTL";
00280 static const char* const MAX_CLASS_CACHE_SIZE_opt = "owcimomd.max_class_cache_size";
00281
00282 static const char* const HTTP_SERVER_REUSE_ADDR_opt = "http_server.reuse_addr";
00283 static const char* const CMPIPROVIFC_PROV_LOCATION_opt = "cmpiprovifc.prov_location";
00284 static const char* const CMPIPROVIFC_PROV_TTL_opt = "cmpiprovifc.prov_TTL";
00285 static const char* const PERLPROVIFC_PROV_LOCATION_opt = "perlprovifc.prov_location";
00286 static const char* const CHECK_REFERENTIAL_INTEGRITY_opt = "owcimomd.check_referential_integrity";
00287 static const char* const POLLING_MANAGER_MAX_THREADS_opt = "owcimomd.polling_manager_max_threads";
00288 static const char* const HTTP_SERVER_TIMEOUT_opt = "http_server.timeout";
00289 static const char* const MAX_INDICATION_EXPORT_THREADS_opt = "owcimomd.max_indication_export_threads";
00290 static const char* const RESTART_ON_ERROR_opt = "owcimomd.restart_on_error";
00291 static const char* const AUTHORIZATION_LIB_opt = "owcimomd.authorization_lib";
00292 static const char* const AUTHORIZATION2_LIB_opt = "owcimomd.authorization2_lib";
00293 static const char* const HTTP_SERVER_LISTEN_ADDRESSES_opt = "http_server.listen_addresses";
00294 static const char* const INTEROP_SCHEMA_NAMESPACE_opt = "owcimomd.interop_schema_namespace";
00295 static const char* const HTTP_SERVER_UDS_FILENAME_opt = "http_server.uds_filename";
00296 static const char* const HTTP_SERVER_ALLOW_LOCAL_AUTHENTICATION_opt = "http_server.allow_local_authentication";
00297 static const char* const REMOTEPROVIFC_MAX_CONNECTIONS_PER_URL_opt = "remoteprovifc.max_connections_per_url";
00298 static const char* const ALLOWED_USERS_opt = "owcimomd.allowed_users";
00299 static const char* const HTTP_SERVER_DEFAULT_CONTENT_LANGUAGE_opt = "http_server.default_content_language";
00300
00301 static const char* const HTTP_SERVER_SSL_CLIENT_VERIFICATION_opt = "http_server.ssl_client_verification";
00302 static const char* const HTTP_SERVER_SSL_TRUST_STORE = "http_server.ssl_trust_store";
00303 static const char* const ADDITIONAL_LOGS_opt = "owcimomd.additional_logs";
00304 static const char* const DISABLE_CPP_PROVIDER_INTERFACE_opt = "owcimomd.disable_cpp_provider_interface";
00305
00306 static const char* const LOG_DEBUG_LOG_NAME = "debug";
00307 static const char* const LOG_MAIN_LOG_NAME = "main";
00308
00309 static const char* const LOG_1_TYPE_opt = "log.%1.type";
00310 static const char* const LOG_1_COMPONENTS_opt = "log.%1.components";
00311 static const char* const LOG_1_CATEGORIES_opt = "log.%1.categories";
00312 static const char* const LOG_1_LEVEL_opt = "log.%1.level";
00313 static const char* const LOG_1_FORMAT_opt = "log.%1.format";
00314 static const char* const LOG_1_LOCATION_opt = "log.%1.location";
00315 static const char* const LOG_1_MAX_FILE_SIZE_opt = "log.%1.max_file_size";
00316 static const char* const LOG_1_MAX_BACKUP_INDEX_opt = "log.%1.max_backup_index";
00317
00318 static const char* const OWBI1IFC_PROV_LOCATION_opt = "owbi1provifc.prov_location";
00319 static const char* const OWBI1IFC_PROV_TTL_opt = "owbi1provifc.prov_ttl";
00320 static const char* const LOG_1_FLUSH_opt = "log.%1.flush";
00321
00322 static const char* const PIDFILE_opt = "owcimomd.pidfile";
00323 static const char* const DROP_ROOT_PRIVILEGES_opt = "owcimomd.drop_root_privileges";
00324 static const char* const ADDITIONAL_CONFIG_FILES_DIRS_opt = "owcimomd.additional_config_files_dirs";
00325
00326 static const char* const EXPLICIT_REGISTRATION_NAMESPACES_opt = "owcimomd.explicit_registration_namespaces";
00327
00328
00329
00330
00331
00332
00333 struct NameAndDefault {
00334 const char* name;
00335 const char* defaultValue;
00336 };
00337 extern const NameAndDefault g_defaults[];
00338 extern const NameAndDefault* const g_defaultsEnd;
00339
00340 }
00341 }
00342
00343 #endif